modifs discussion
[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 17
7adc7f71
OL
18 url(r'^api/pong/', include('auf.django.pong.urls')),
19 (r'^admin/', include(admin.site.urls)),
20)
21
22if settings.DEBUG:
23 urlpatterns += staticfiles_urlpatterns()
24 urlpatterns += patterns(
25 '',
36536909
OL
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
7adc7f71
OL
35 url(r'^media/(?P<path>.*)$',
36 'django.views.static.serve',
37 {'document_root': settings.MEDIA_ROOT, }),
38 )