aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Ochotnicky <sochotnicky@gmail.com>2009-08-11 10:42:49 +0200
committerStanislav Ochotnicky <sochotnicky@gmail.com>2009-08-11 10:42:49 +0200
commitb060a004230cf0ba94b093a9ebb6a34d2868c4bb (patch)
treeee6513911e6766af4fd2dddd77f1a418ad4e6a2f
parentChanged view of attachment to use utf-8 charset (diff)
downloadcollagen-b060a004230cf0ba94b093a9ebb6a34d2868c4bb.tar.gz
collagen-b060a004230cf0ba94b093a9ebb6a34d2868c4bb.tar.bz2
collagen-b060a004230cf0ba94b093a9ebb6a34d2868c4bb.zip
Changed urls of attachments to preserve name
So when you push ctrl-s in browser, it offers proper filename instead of number
-rw-r--r--web/main/urls.py2
-rw-r--r--web/templates/view-package-props.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/main/urls.py b/web/main/urls.py
index 2aa40d9..f7adcc1 100644
--- a/web/main/urls.py
+++ b/web/main/urls.py
@@ -9,7 +9,7 @@ urlpatterns = patterns('',
(r'^browse/(?P<category_name>\w+-\w+)$', prefix+'browse'),
(r'^browse/(?P<category_name>\w+(-\w+){0,1})/(?P<pkg_name>.*)$', prefix+'browse'),
(r'^view/package/(?P<category_name>\w+(-\w*){0,1})/(?P<pkg_name>[a-zA-Z_-]+)-(?P<pkg_ver>[0-9_.r-]+)$', prefix+'view'),
- (r'^view/attachment/(?P<attachment_id>\d+)$', prefix+'view_attachment'),
+ (r'^view/attachment/(?P<attachment_id>\d+)/.*$', prefix+'view_attachment'),
(r'^view/content/(?P<packageproperties_id>\d+)$', prefix+'view_content'),
(r'^search/by-path/(?P<path>.*)$', prefix+'search_by_path'),
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_DIR, 'show_indexes': True}),
diff --git a/web/templates/view-package-props.html b/web/templates/view-package-props.html
index b262bea..ee9f27a 100644
--- a/web/templates/view-package-props.html
+++ b/web/templates/view-package-props.html
@@ -19,7 +19,7 @@ Compile information for: {{cpv}}
{% endfor %} <br />
Attachments:
{% for attachment in prop.attachment_set.all %}
- <a href="/collagen/view/attachment/{{attachment.id}}">{{attachment.name}}</a>&nbsp;
+ <a href="/collagen/view/attachment/{{attachment.id}}/{{attachment.name}}">{{attachment.name}}</a>&nbsp;
{% endfor %}<br />
Content: <a href="/collagen/view/content/{{prop.id}}">list</a>
</div>