Remove "/?" from resource URLs, add missing csrf_token, fix some errors.
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Thu, 2 Jan 2014 10:03:45 +0000 (11:03 +0100)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Thu, 2 Jan 2014 10:03:45 +0000 (11:03 +0100)
apps/catalogue/urls.py
apps/picture/templates/admin/picture/picture/change_list.html
apps/picture/templates/picture/picture_short.html
wolnelektury/settings/static.py

index 7c11090..5392858 100644 (file)
@@ -14,9 +14,9 @@ SLUG = r'[a-z0-9-]*'
 
 urlpatterns = patterns('picture.views',
     # pictures - currently pictures are coupled with catalogue, hence the url is here
 
 urlpatterns = patterns('picture.views',
     # pictures - currently pictures are coupled with catalogue, hence the url is here
-    url(r'^obraz/?$', 'picture_list_thumb', name='picture_list_thumb'),
+    url(r'^obraz/$', 'picture_list_thumb', name='picture_list_thumb'),
     url(r'^obraz/(?P<slug>%s).html$' % SLUG, 'picture_viewer', name='picture_viewer'),
     url(r'^obraz/(?P<slug>%s).html$' % SLUG, 'picture_viewer', name='picture_viewer'),
-    url(r'^obraz/(?P<slug>%s)/?$' % SLUG, 'picture_detail'),
+    url(r'^obraz/(?P<slug>%s)/$' % SLUG, 'picture_detail'),
 
 )
 
 
 )
 
index 940d81f..05566c0 100755 (executable)
@@ -3,6 +3,7 @@
 
 {% block content %}
     <form action="{% url 'import_picture' %}" method="post" enctype="multipart/form-data">
 
 {% block content %}
     <form action="{% url 'import_picture' %}" method="post" enctype="multipart/form-data">
+    {% csrf_token %}
         <p>XML: <input type="file" id="id_picture_xml_file" name="picture_xml_file" /><br/>
             {% trans "Image" %}: <input type="file" id="id_picture_image_file" name="picture_image_file" /><br/>
             <input type="submit" value="{% trans "Import picture" %}"/></p>
         <p>XML: <input type="file" id="id_picture_xml_file" name="picture_xml_file" /><br/>
             {% trans "Image" %}: <input type="file" id="id_picture_image_file" name="picture_image_file" /><br/>
             <input type="submit" value="{% trans "Import picture" %}"/></p>
index 080bd16..3b45530 100644 (file)
          {% if picture.image_file %}
          <span><a href="{{ picture.image_file.url}}">JPG</a> {% trans "original" %}</span>
          {% endif %}
          {% if picture.image_file %}
          <span><a href="{{ picture.image_file.url}}">JPG</a> {% trans "original" %}</span>
          {% endif %}
-       </div>-->
-      </li>
+       </div>
+      </li>-->
     </ul>
     {% block book-box-extra-info %}{% endblock %}
     {% block box-append %}
     {% endblock %}
     {% block right-column %}
     {% endblock %}
     </ul>
     {% block book-box-extra-info %}{% endblock %}
     {% block box-append %}
     {% endblock %}
     {% block right-column %}
     {% endblock %}
-    <div class="clearboth"/>
+    <div class="clearboth"></div>
 </div>
 </div>
 </div>
 </div>
index 1e8bd96..3ad7d8a 100644 (file)
@@ -130,5 +130,5 @@ PIPELINE_JS_COMPRESSOR = None
 PIPELINE_COMPILERS = (
     'pyscss_compiler.PySCSSCompiler',
 )
 PIPELINE_COMPILERS = (
     'pyscss_compiler.PySCSSCompiler',
 )
-PIPELINE_PYSCSS_BINARY = '/usr/bin/env /home/staging/wolnelektury.pl/ve/bin/pyscss'
+PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
 PIPELINE_PYSCSS_ARGUMENTS = ''
 PIPELINE_PYSCSS_ARGUMENTS = ''