modifs discussion
[auf_skeleton_django.git] / project_name / urls.py
1 # -*- coding: utf-8 -*-
2
3 from django.conf.urls.defaults import patterns, include,\
4 handler500, handler404, url
5 from django.conf import settings
6
7 from django.contrib import admin
8 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
9
10 admin.autodiscover()
11
12 handler404
13 handler500
14
15 urlpatterns = patterns(
16 '',
17
18 url(r'^api/pong/', include('auf.django.pong.urls')),
19 (r'^admin/', include(admin.site.urls)),
20 )
21
22 if settings.DEBUG:
23 urlpatterns += staticfiles_urlpatterns()
24 urlpatterns += patterns(
25 '',
26 # fichiers statiques normalement servis par le frontal
27 url(r'^robots.txt/$',
28 'django.views.static.serve',
29 {'path': 'robots.txt', }),
30 url(r'^favicon.ico/$',
31 'django.views.static.serve',
32 {'path': 'favicon.ico', }),
33 # fin fichier statiques
34
35 url(r'^media/(?P<path>.*)$',
36 'django.views.static.serve',
37 {'document_root': settings.MEDIA_ROOT, }),
38 )