urls.py 711 Bytes
Newer Older
Ben Waters's avatar
init  
Ben Waters committed
1
from django.conf.urls import patterns, include, url
2 3 4
from django.views.decorators.csrf import csrf_exempt
from rest_framework.authtoken.views import obtain_auth_token
from rest_framework import routers
Ben Waters's avatar
init  
Ben Waters committed
5 6 7 8

from django.contrib import admin
admin.autodiscover()

9
router = routers.DefaultRouter()
Ben Waters's avatar
init  
Ben Waters committed
10 11 12 13 14
urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'ffREST.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

15 16
    url(r'^', include(router.urls)),
    url(r'^admin/docs/', include('django.contrib.admindocs.urls')),
Ben Waters's avatar
init  
Ben Waters committed
17
    url(r'^admin/', include(admin.site.urls)),
18 19
    url(r'^api/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api/authtoken/', obtain_auth_token),
Ben Waters's avatar
init  
Ben Waters committed
20
)