From: Radek Czajka <radekczajka@nowoczesnapolska.org.pl>
Date: Thu, 2 Jan 2014 10:03:45 +0000 (+0100)
Subject: Remove "/?" from resource URLs, add missing csrf_token, fix some errors.
X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/31e96ec0d71911f016193d5b67b6da3dc697ac9c?ds=inline

Remove "/?" from resource URLs, add missing csrf_token, fix some errors.
---

diff --git a/apps/catalogue/urls.py b/apps/catalogue/urls.py
index 7c1109008..53928589d 100644
--- a/apps/catalogue/urls.py
+++ b/apps/catalogue/urls.py
@@ -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
-    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)/?$' % SLUG, 'picture_detail'),
+    url(r'^obraz/(?P<slug>%s)/$' % SLUG, 'picture_detail'),
 
 )
 
diff --git a/apps/picture/templates/admin/picture/picture/change_list.html b/apps/picture/templates/admin/picture/picture/change_list.html
index 940d81f62..05566c0ab 100755
--- a/apps/picture/templates/admin/picture/picture/change_list.html
+++ b/apps/picture/templates/admin/picture/picture/change_list.html
@@ -3,6 +3,7 @@
 
 {% 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>
diff --git a/apps/picture/templates/picture/picture_short.html b/apps/picture/templates/picture/picture_short.html
index 080bd1618..3b4553027 100644
--- a/apps/picture/templates/picture/picture_short.html
+++ b/apps/picture/templates/picture/picture_short.html
@@ -65,14 +65,14 @@
 	  {% 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 %}
-    <div class="clearboth"/>
+    <div class="clearboth"></div>
 </div>
 </div>
diff --git a/wolnelektury/settings/static.py b/wolnelektury/settings/static.py
index 1e8bd9628..3ad7d8ae5 100644
--- a/wolnelektury/settings/static.py
+++ b/wolnelektury/settings/static.py
@@ -130,5 +130,5 @@ PIPELINE_JS_COMPRESSOR = None
 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 = ''