fichier statique
[auf_skeleton_django.git] / project_name / urls.py
CommitLineData
7adc7f71
OL
1# -*- coding: utf-8 -*-
2
3from django.conf.urls.defaults import patterns, include,\
4 handler500, handler404, url
5from django.conf import settings
6
7from django.contrib import admin
8from django.contrib.staticfiles.urls import staticfiles_urlpatterns
9
10admin.autodiscover()
11
12handler404
13handler500
14
15urlpatterns = patterns(
16 '',
da7a2266
OL
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
7adc7f71
OL
27 url(r'^api/pong/', include('auf.django.pong.urls')),
28 (r'^admin/', include(admin.site.urls)),
29)
30
31if 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 )