forked from MaZderMind/django-vs-extjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
34 lines (25 loc) · 854 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from django.conf.urls import patterns, include, url
from rest_framework import viewsets, routers
# admin ui
from django.contrib import admin
admin.autodiscover()
# routers for the rest-api
restrouter = routers.DefaultRouter()
# add api-routers for the polls application
from polls import rest as pollsapi
pollsapi.register(restrouter)
# root-level url patterns
urlpatterns = patterns('',
# frontpage
url(r'^', include('frontend.urls')),
# admin-ui
url(r'^admin/', include(admin.site.urls)),
# provide a login-link in the browsable api
url(r'^api/ui-auth/', include('rest_framework.urls', namespace='rest_framework')),
# login for rest-api
url(r'^api/auth/', include('rest_auth.urls')),
# login for rest-api
url(r'^api/', include('frontend.apiurls')),
# base for the browsable- the rest-api
url(r'^api/', include(restrouter.urls)),
)