-
Notifications
You must be signed in to change notification settings - Fork 4
/
urls.py
49 lines (32 loc) · 1.76 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
__author__ = 'Derek Stegelman'
__date__ = '9/5/12'
admin.autodiscover()
from sprints.ajax import update_status, change_task
urlpatterns = patterns('',
url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'accounts/login.html'}),
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/login.html'}, name="logout"),
url(r'^admin/', include(admin.site.urls)),
url(r'^$', 'core.views.homepage', name='homepage'),
url(r'^myprofile/$', 'accounts.views.profile', name='user_profile'),
url(r'^registration/$', 'accounts.views.registration', name="account_registration"),
url(r'^ajax/sprints/', include('sprints.ajax_urls')),
url(r'^projects/', include('projects.urls')),
url(r'^activity/', include('actstream.urls')),
url(r'^(?P<account>[-\w]+)/', include('accounts.urls')),
url(r'^(?P<account>[-\w]+)/sprints/', include('sprints.urls')),
url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'accounts/login.html'}, name='login'),
url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'accounts/login.html'}, name="logout"),
#AJAX
url(r'^ajax/update/task/(?P<task_id>\d+)/$', change_task, name='ajax_change_task'),
url(r'^ajax/update/story/(?P<story_id>\d+)/$', update_status, name='ajax_update_status'),
)
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)
urlpatterns += staticfiles_urlpatterns()