Matching just /docs created a very small namespace, since any other path parts
authorTodd Larsen <tlarsen@google.com>
Wed, 01 Oct 2008 07:10:43 +0000
changeset 241 0408b85de42b
parent 240 dd0497f6da41
child 242 17984abf0c74
Matching just /docs created a very small namespace, since any other path parts would match the Document path. So, append /show after /docs for the display view. This makes other views like /docs/edit possible later.
app/soc/templates/soc/site/docs/edit.html
app/urls.py
--- a/app/soc/templates/soc/site/docs/edit.html	Wed Oct 01 07:01:06 2008 +0000
+++ b/app/soc/templates/soc/site/docs/edit.html	Wed Oct 01 07:10:43 2008 +0000
@@ -26,7 +26,7 @@
 {% block header_title %}
  {% if existing_doc %}
   Modify Existing Document
-   <a href="/docs/{{ existing_doc.partial_path }}/{{ existing_doc.link_name }}">"{{ existing_doc.title }}"</a>
+   <a href="/docs/show/{{ existing_doc.partial_path }}/{{ existing_doc.link_name }}">"{{ existing_doc.title }}"</a>
  {% else %}
   Create a New Document
  {% endif %}
--- a/app/urls.py	Wed Oct 01 07:01:06 2008 +0000
+++ b/app/urls.py	Wed Oct 01 07:10:43 2008 +0000
@@ -44,7 +44,7 @@
      'soc.views.site.user.profile.edit'),
     (r'^site/user/list$', 'soc.views.site.user.list.all'),
 
-    (r'^docs/%s$' % key_name.WORK_PATH_LINKNAME_ARGS_PATTERN,
+    (r'^docs/show/%s$' % key_name.WORK_PATH_LINKNAME_ARGS_PATTERN,
      'soc.views.docs.show.public'),
 
     (r'^site/docs/edit$', 'soc.views.site.docs.edit.create'),