Cleanups.
This commit is contained in:
@@ -4,8 +4,6 @@ from django.conf.urls import include, patterns, url
|
||||
from django.conf import settings
|
||||
from django.utils.module_loading import import_string
|
||||
|
||||
from rest_framework.reverse import reverse
|
||||
|
||||
|
||||
class APIEndPoint(object):
|
||||
_registry = {}
|
||||
@@ -30,7 +28,7 @@ class APIEndPoint(object):
|
||||
api_urls = import_string(
|
||||
'{0}.urls.api_urls'.format(app.name)
|
||||
)
|
||||
except Exception as exception:
|
||||
except Exception:
|
||||
if settings.DEBUG:
|
||||
raise
|
||||
else:
|
||||
|
||||
@@ -6,7 +6,7 @@ from navigation import Link
|
||||
|
||||
link_api = Link(
|
||||
icon='fa fa-plug', tags='new_window', text=_('REST API'),
|
||||
view='rest_api:api-root'
|
||||
view='rest_api:api_root'
|
||||
)
|
||||
link_api_documentation = Link(
|
||||
icon='fa fa-book', tags='new_window', text=_('API Documentation'),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import include, patterns, url
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
from .views import APIBase, APIAppView, BrowseableObtainAuthToken
|
||||
|
||||
@@ -11,8 +11,8 @@ urlpatterns = patterns(
|
||||
|
||||
api_urls = patterns(
|
||||
'',
|
||||
url(r'^$', APIBase.as_view(), name='api-root'),
|
||||
url(r'^api/(?P<path>.*)/?$', APIAppView.as_view(), name='api-app'),
|
||||
url(r'^$', APIBase.as_view(), name='api_root'),
|
||||
url(r'^api/(?P<path>.*)/?$', APIAppView.as_view(), name='api_app'),
|
||||
url(
|
||||
r'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(),
|
||||
name='auth_token_obtain'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from rest_framework import generics, renderers
|
||||
from rest_framework import renderers
|
||||
from rest_framework.authtoken.views import ObtainAuthToken
|
||||
from rest_framework_swagger.views import SwaggerApiView, SwaggerResourcesView
|
||||
|
||||
|
||||
Reference in New Issue
Block a user