aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/urls.py
diff options
context:
space:
mode:
authorTom Christie2011-06-02 12:58:10 +0100
committerTom Christie2011-06-02 12:58:10 +0100
commitb50492853f537a2473bb0a9eea86c8b0ed6b8824 (patch)
treed289d39aacf187a8a0696a4c1c863aabe1472c3a /djangorestframework/urls.py
parent7ee9adbe5c03c29cd4a894dd476548f7fe73b5e4 (diff)
parentfc1640de75511006e89f033c9270ec91a9f1e4d4 (diff)
downloaddjango-rest-framework-b50492853f537a2473bb0a9eea86c8b0ed6b8824.tar.bz2
pull in -dev as 0.2.0
Diffstat (limited to 'djangorestframework/urls.py')
-rw-r--r--djangorestframework/urls.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/djangorestframework/urls.py b/djangorestframework/urls.py
new file mode 100644
index 00000000..271b0215
--- /dev/null
+++ b/djangorestframework/urls.py
@@ -0,0 +1,16 @@
+from django.conf.urls.defaults import patterns
+from django.conf import settings
+
+urlpatterns = patterns('djangorestframework.utils.staticviews',
+ (r'robots.txt', 'deny_robots'),
+ (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.utils.staticviews',
+ (r'favicon.ico', 'favicon'),
+ ) \ No newline at end of file