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.*)/(?P\d{4})$', 'tipp.views.getSeason'), url(r'^update/(?P.*)/(?P\d{4})/(?P\d{2})$', 'tipp.views.update', name='update'), url(r'^matchday/(?P.{3,})/(?P\d{4})/(?P\d{2})$', 'tipp.views.matchday', name='matchday'), url(r'^charts/(?P\w{3,})/(?P\d{4})$', 'tipp.views.charts', name='charts'), url(r'^charts/(?P\w{3,})/(?P\d{4})/(?P\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\d)$', 'tipp.views.blogindex'), # 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.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }), )