- )
-
-
-if settings.DEBUG:
- urlpatterns += patterns('',
- url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
- 'document_root': settings.MEDIA_ROOT,
- }),
- )
+ ]
+else:
+ from django.contrib.auth.views import login, logout
+ urlpatterns += [
+ url(r'^accounts/login/$', login, name='login'),
+ url(r'^accounts/logout/$', logout, name='logout'),
+ ]
+
+urlpatterns += (
+ url(r'^(?P<url>[^/]*/|)$',
+ lambda request, url: flatpage(request, 'turniej/' + url)),
+)