Get rids of the APIEndPoint and APIResource classes. Register API url using the 'has_rest_api' AppConfig variable.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
36d19ea284
commit
e1956f8d80
@@ -1,21 +1,17 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.conf.urls import include, url
|
||||
|
||||
from .api_views import APIResourceTypeListView
|
||||
from .views import APIBase, BrowseableObtainAuthToken
|
||||
from .api_views import BrowseableObtainAuthToken
|
||||
|
||||
|
||||
urlpatterns = []
|
||||
|
||||
api_urls = [
|
||||
url(r'^$', APIBase.as_view(), name='api_root'),
|
||||
url(
|
||||
r'^resources/$', APIResourceTypeListView.as_view(),
|
||||
name='resource-list'
|
||||
),
|
||||
url(
|
||||
r'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(),
|
||||
name='auth_token_obtain'
|
||||
),
|
||||
]
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^', include(api_urls)),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user