urls.py
changeset 12 a93eebabfeb1
parent 10 bf0cbea1bd12
child 13 0fb64b24a1c9
equal deleted inserted replaced
11:7c9fea7e28c8 12:a93eebabfeb1
     1 from django.conf.urls.defaults import *
     1 from django.conf.urls.defaults import *
     2 
     2 
     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 
       
     7 from pytask.taskapp.views.users import redirect_to_homepage, homepage
       
     8 from pytask.taskapp.views.tasks import browse_tasks, view_task
     6 
     9 
     7 urlpatterns = patterns('',
    10 urlpatterns = patterns('',
     8     # Example:
    11     # Example:
     9     # (r'^pytask/', include('pytask.foo.urls')),
    12     # (r'^pytask/', include('pytask.foo.urls')),
    10 
    13 
    11     # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    14     # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    12     # to INSTALLED_APPS to enable admin documentation:
    15     # to INSTALLED_APPS to enable admin documentation:
    13     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    16     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    14     
    17     
       
    18     (r'^$', homepage),
       
    19     (r'^task/browse/$', browse_tasks),
       
    20     (r'^task/view/tid=(\d+)', view_task),
       
    21     
    15     (r'^admin/', include(admin.site.urls)),
    22     (r'^admin/', include(admin.site.urls)),
    16 
    23 
    17 )
    24 )