urls.py 900 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()

from trajectories.views import course, student, trajectory, create, new

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'advisor.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    # course
Daniel W Bond's avatar
Daniel W Bond committed
13
    url(r'^course/(?P<courseSlug>\w+)/$', 'course', name = 'course'),
14
15

    # student's page
Daniel W Bond's avatar
Daniel W Bond committed
16
    url(r'^(?P<username>\w+)/$', 'student', name = 'student'),
17
18

    # single trajectory page
Daniel W Bond's avatar
Daniel W Bond committed
19
    url(r'^(?P<username>\w+)/(?P<trajectorySlug>\w+)$', 'trajectory', name = 'trajectory'),
20
21
22
23
24
25
26
27
28

    # a new trajectory
    # url(r'^user/(?P<username>\w+)/new/$', 'new', name = 'new'),
    url(r'^new/$', 'new', name = 'new'),

    # creating the trajectory
    # url(r'^user/(?P<username>\w+)/create/$', 'create', name = 'create'),
    url(r'^create/$', 'create', name = 'create'),
)