changeset 85:531fcc342a03

Forums: put the forum indices under the url forums/forum to avoid clashing with other functions. Modified the forum index template to have a link to the topic creator's profile.
author Brian Neal <bgneal@gmail.com>
date Sun, 30 Aug 2009 19:58:42 +0000
parents 9e5e52556d5b
children f81226b5e87b
files gpp/forums/urls.py gpp/templates/forums/forum_index.html
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/forums/urls.py	Sat Aug 29 22:01:40 2009 +0000
+++ b/gpp/forums/urls.py	Sun Aug 30 19:58:42 2009 +0000
@@ -7,7 +7,7 @@
     url(r'^$', 'index', name='forums-index'),
     url(r'^new-topic-success/(?P<tid>\d+)$', 'new_topic_thanks', name='forums-new_topic_thanks'),
     url(r'^topic/(?P<id>\d+)/$', 'topic_index', name='forums-topic_index'),
-    url(r'^(?P<slug>[\w\d-]+)/$', 'forum_index', name='forums-forum_index'),
-    url(r'^(?P<slug>[\w\d-]+)/topic/$', 'new_topic', name='forums-new_topic'),
+    url(r'^forum/(?P<slug>[\w\d-]+)/$', 'forum_index', name='forums-forum_index'),
+    url(r'^forum/(?P<slug>[\w\d-]+)/new-topic/$', 'new_topic', name='forums-new_topic'),
 )
 
--- a/gpp/templates/forums/forum_index.html	Sat Aug 29 22:01:40 2009 +0000
+++ b/gpp/templates/forums/forum_index.html	Sun Aug 30 19:58:42 2009 +0000
@@ -26,7 +26,7 @@
       <tr>
          <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td>
          <td class="forum-index_replies">{{ topic.reply_count }}</td>
-         <td class="forum-index_author">{{ topic.user.username }}</td>
+         <td class="forum-index_author"><a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a></td>
          <td class="forum-index_views">{{ topic.view_count }}</td>
          <td class="forum-index_last_post">
             {% last_post_info topic.last_post %}