Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
c25f8f84
Commit
c25f8f84
authored
Mar 09, 2011
by
tom christie tom@tomchristie.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #27
parent
f8eb5a75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
examples/urls.py
+9
-1
No files found.
examples/urls.py
View file @
c25f8f84
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'
),
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment