]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/urls.py
Adds better permalinks to answers, computing the position of an answer in the list.
[osqa.git] / forum / urls.py
index c14fa92f4fb598f4362f5760f7ae70a64529db3a..92c0d6bf6a18f1347d9af9c656fb49b4d1aeae48 100644 (file)
@@ -93,8 +93,10 @@ urlpatterns += patterns('',
 
                         url(r'^%s(?P<id>\d+)/(?P<slug>[\w-]*)$' % _('question/'),
                             'django.views.generic.simple.redirect_to', {'url': '/questions/%(id)s/%(slug)s'}),
-                        url(r'^%s(?P<id>\d+)/(?P<slug>[\w-]*)$' % _('questions/'), app.readers.question, name='question'
-                            ),
+                        url(r'^%s(?P<id>\d+)/(?P<slug>[\w-]*)$' % _('questions/'), app.readers.question, name='question'),
+                        url(r'^%s(?P<id>\d+)/(?P<slug>[\w-]*)/(?P<answer>\d+)$' % _('questions/'), app.readers.question),
+
+
                         url(r'^%s$' % _('tags/'), app.readers.tags, name='tags'),
                         url(r'^%s(?P<tag>.*)/$' % _('tags/'), app.readers.tag, name='tag_questions'),
 
@@ -192,7 +194,7 @@ urlpatterns += patterns('',
                         url(r'^%s%s(?P<set_name>\w+)/$' % (_('admin/'), _('settings/')), app.admin.settings_set,
                             name="admin_set"),
 
-                        url(r'^feeds/rss/$', app.readers.feed, name="latest_questions_feed"),
+                        url(r'^feeds/rss[/]?$', app.readers.feed, name="latest_questions_feed"),
 
                         url(r'^(?P<path>.+)$', app.meta.page, name="static_page")
                         )