Fix error in collection templates.
authorDevan Goodwin <dgoodwin@rm-rf.ca>
Sun, 20 Oct 2013 20:06:56 +0000 (17:06 -0300)
committerDevan Goodwin <dgoodwin@rm-rf.ca>
Sun, 20 Oct 2013 20:06:56 +0000 (17:06 -0300)
Removed unicode strings from some recently added has_privilege calls.
Appears this is not valid syntax as it would be in the python code
itself. Causes an error showing the template:

Error - <class 'jinja2.exceptions.TemplateSyntaxError?'>: expected token
',', got 'string'

mediagoblin/templates/mediagoblin/user_pages/collection.html
mediagoblin/templates/mediagoblin/utils/collection_gallery.html

index 87635dcb04c673834ce65377a9fa79786941e94d..988c65561c3f9a23b8ce41c63153d3a7674ffa4c 100644 (file)
@@ -44,8 +44,8 @@
       {{ collection_title }} by <a href="{{ user_url }}">{{ username }}</a>
     {%- endtrans %}
   </h1>
-  {% if request.user and (collection.creator == request.user.id or 
-                                                request.user.has_privilege(u'admin')) %}
+  {% if request.user and (collection.creator == request.user.id or
+                                                request.user.ghas_privilege('admin')) %}
     {% set edit_url = request.urlgen('mediagoblin.edit.edit_collection',
                                      user=collection.get_creator.username,
                                      collection=collection.slug) %}
   </p>
 
   {{ collection_gallery(request, collection_items, pagination) }}
-    
+
   {% set feed_url = request.urlgen('mediagoblin.user_pages.collection_atom_feed',
-                                   user=user.username, 
+                                   user=user.username,
                                    collection=collection.slug ) %}
   {% include "mediagoblin/utils/feed_link.html" %}
-    
-{% endblock %}    
+
+{% endblock %}
index 24bf6832cfa7c818b55e36ac932bc6112210e96c..dfe2ebe2f25589a865e6c58329b26c7cd7ef6b00 100644 (file)
@@ -38,8 +38,8 @@
               <a href="{{ entry_url }}">{{ item.note }}</a>
             {% endif %}
            {% if request.user and
-                  (item.in_collection.creator == request.user.id or 
-                  request.user.has_privilege(u'admin')) %}
+                  (item.in_collection.creator == request.user.id or
+                  request.user.has_privilege('admin')) %}
              {%- set remove_url=request.urlgen(
                                  'mediagoblin.user_pages.collection_item_confirm_remove',
                                  user=item.in_collection.get_creator.username,