fichier statique
[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 # fichiers statiques normalement servis par le frontal
19 url(r'^robots.txt/$',
20 'django.views.static.serve',
21 {'path': 'robots.txt', }),
22 url(r'^favicon.ico/$',
23 'django.views.static.serve',
24 {'path': 'favicon.ico', }),
25 # fin fichier statiques
26
27 url(r'^api/pong/', include('auf.django.pong.urls')),
28 (r'^admin/', include(admin.site.urls)),
29 )
30
31 if settings.DEBUG:
32 urlpatterns += staticfiles_urlpatterns()
33 urlpatterns += patterns(
34 '',
35 url(r'^media/(?P<path>.*)$',
36 'django.views.static.serve',
37 {'document_root': settings.MEDIA_ROOT, }),
38 )