mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-03-19 17:34:13 +03:00
fix #27
This commit is contained in:
parent
f8eb5a75d2
commit
c25f8f8427
|
@ -1,9 +1,9 @@
|
|||
from django.conf.urls.defaults import patterns, include, url
|
||||
from django.conf import settings
|
||||
from sandbox.views import Sandbox
|
||||
|
||||
urlpatterns = patterns('djangorestframework.views',
|
||||
(r'robots.txt', 'deny_robots'),
|
||||
(r'favicon.ico', 'favicon'),
|
||||
|
||||
(r'^$', Sandbox.as_view()),
|
||||
|
||||
|
@ -17,3 +17,11 @@ urlpatterns = patterns('djangorestframework.views',
|
|||
(r'^accounts/login/$', 'api_login'),
|
||||
(r'^accounts/logout/$', 'api_logout'),
|
||||
)
|
||||
|
||||
# Only serve favicon in production because otherwise chrome users will pretty much
|
||||
# permanantly have the django-rest-framework favicon whenever they navigate to
|
||||
# 127.0.0.1:8000 or whatever, which gets annoying
|
||||
if not settings.DEBUG:
|
||||
urlpatterns += patterns('djangorestframework.views',
|
||||
(r'favicon.ico', 'favicon'),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user