46 lines
1.7 KiB
Python
46 lines
1.7 KiB
Python
from django.conf.urls import patterns, include, url
|
|
from django.conf import settings
|
|
|
|
# Uncomment the next two lines to enable the admin:
|
|
from django.contrib import admin
|
|
admin.autodiscover()
|
|
|
|
urlpatterns = patterns('',
|
|
# Examples:
|
|
url(r'^$', 'tipp.views.home', name='home'),
|
|
url(r'^login$', 'django.contrib.auth.views.login', {
|
|
'template_name': 'login.html'}),
|
|
url(r'^logout$', 'django.contrib.auth.views.logout', {
|
|
'next_page': '/'}),
|
|
url(r'^getSeason/(?P<ls>.*)/(?P<season>\d{4})$',
|
|
'tipp.views.getSeason'),
|
|
url(r'^update/(?P<ls>.*)/(?P<season>\d{4})/(?P<cur_md>\d{2})$',
|
|
'tipp.views.update', name='update'),
|
|
url(r'^matchday/(?P<ls>.{3,})/(?P<season>\d{4})/(?P<matchday>\d{2})$',
|
|
'tipp.views.matchday', name='matchday'),
|
|
url(r'^charts/(?P<ls>\w{3,})/(?P<season>\d{4})$', 'tipp.views.charts',
|
|
name='charts'),
|
|
url(r'^charts/(?P<ls>\w{3,})/(?P<season>\d{4})/(?P<pos>\w{1,})$',
|
|
'tipp.views.charts', name='charts'),
|
|
url(r'^accounts/profile/(\d+)', 'tipp.views.profile'),
|
|
url(r'^accounts/', include('django.contrib.auth.urls')),
|
|
url(r'^blog/newpost$', 'tipp.views.newBlogpost'),
|
|
url(r'^blog/(?P<page>\d)$', 'tipp.views.blogindex'),
|
|
url(r'^about$', 'tipp.views.about'),
|
|
|
|
# Uncomment the admin/doc line below to enable admin documentation:
|
|
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
|
|
# Uncomment the next line to enable the admin:
|
|
url(r'^admin/', include(admin.site.urls)),
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += patterns('',
|
|
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
|
|
'document_root': settings.MEDIA_ROOT,
|
|
}),
|
|
)
|
|
|
|
|