Example #1
0
from django.conf.urls import *
from curia.forums.models import Thread
from curia import labels, authentication, notifications

urlpatterns = patterns('curia.forums.views',
    (r'^$', 'view_forum'),
    (r'^add/$', 'add_thread'),
    (r'^page/(?P<page>\d+)/$', 'view_forum'),
    (r'^(?P<group_id>\d+)/$', 'view_forum'),
    (r'^(?P<group_id>\d+)/add/$', 'add_thread'),
    (r'^(?P<group_id>\d+)/page/(?P<page>\d+)/$', 'view_forum'),
    (r'^threads/(?P<thread_id>\d+)/$', 'view_thread'),
    (r'^threads/(?P<thread_id>\d+)/page/(?P<page>\d+)/$', 'view_thread'),
    (r'^threads/(?P<thread_id>\d+)/edit/$', 'edit_thread'),
    (r'^threads/(?P<thread_id>\d+)/delete/$', 'delete_thread'),
    (r'^message/(?P<message_id>\d+)/delete/$', 'delete_message'),
    (r'^message/(?P<message_id>\d+)/edit/$', 'edit_message'),
)

authentication.add_patterns(urlpatterns, Thread)
notifications.add_patterns(urlpatterns, Thread, 'threads/')
labels.add_patterns(urlpatterns, Thread)
Example #2
0
from django.conf.urls import *
from curia.files.models import File
from curia import labels, authentication, notifications

urlpatterns = patterns('curia.files.views',
    #(r'^users/(?P<user_id>\d+)/$', 'view_files_of_user'),
    (r'^add/$', 'add_file'),
    (r'^$', 'view_files_of_group'),
    (r'^page/(?P<page>\d+)/$', 'view_files_of_group'),
    (r'^groups/(?P<group_id>\d+)/$', 'view_files_of_group'),
    (r'^groups/(?P<group_id>\d+)/page/(?P<page>\d+)/$', 'view_files_of_group'),
    (r'^(?P<file_id>\d+)/edit/$', 'edit_file'),
    (r'^(?P<file_id>\d+)/delete/$', 'delete_file'),
)

authentication.add_patterns(urlpatterns, File)
notifications.add_patterns(urlpatterns, File, 'files/')
labels.add_patterns(urlpatterns, File)