urls.py
changeset 21 c28774fe7ffd
parent 18 a39549bd5b08
child 22 36d3173ab7f9
equal deleted inserted replaced
20:ec7b1751c161 21:c28774fe7ffd
     3 # Uncomment the next two lines to enable the admin:
     3 # Uncomment the next two lines to enable the admin:
     4 from django.contrib import admin
     4 from django.contrib import admin
     5 admin.autodiscover()
     5 admin.autodiscover()
     6 
     6 
     7 from pytask.taskapp.views.user import homepage, register, user_login, user_logout
     7 from pytask.taskapp.views.user import homepage, register, user_login, user_logout
     8 from pytask.taskapp.views.task import browse_tasks, view_task, create_task
     8 from pytask.taskapp.views.task import browse_tasks, view_task, create_task, add_mentor, add_tasks
     9 
     9 
    10 urlpatterns = patterns('',
    10 urlpatterns = patterns('',
    11     # Example:
    11     # Example:
    12     # (r'^pytask/', include('pytask.foo.urls')),
    12     # (r'^pytask/', include('pytask.foo.urls')),
    13 
    13 
    17     
    17     
    18     (r'^$', homepage),
    18     (r'^$', homepage),
    19     (r'^task/browse/$', browse_tasks),
    19     (r'^task/browse/$', browse_tasks),
    20     (r'^task/view/tid=(\d+)$', view_task),
    20     (r'^task/view/tid=(\d+)$', view_task),
    21     (r'^task/create/$', create_task),
    21     (r'^task/create/$', create_task),
       
    22     (r'^task/addmentor/tid=(\d+)', add_mentor),
       
    23     (r'^task/addtasks/tid=(\d+)', add_tasks),
    22     
    24     
    23     (r'^admin/', include(admin.site.urls)),
    25     (r'^admin/', include(admin.site.urls)),
    24     
    26     
    25     (r'^accounts/register/$',register),
    27     (r'^accounts/register/$',register),
    26     (r'^accounts/login/$',user_login),
    28     (r'^accounts/login/$',user_login),