Exclude root API and API doc URLs.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from common import MayanAppConfig, menu_tools
|
from common import MayanAppConfig, menu_tools
|
||||||
@@ -17,6 +18,8 @@ class RESTAPIApp(MayanAppConfig):
|
|||||||
def ready(self):
|
def ready(self):
|
||||||
super(RESTAPIApp, self).ready()
|
super(RESTAPIApp, self).ready()
|
||||||
|
|
||||||
|
settings.STRONGHOLD_PUBLIC_URLS += (r'^/%s/.+$' % self.app_url,)
|
||||||
|
|
||||||
APIEndPoint(app=self, name='rest', version_string='1')
|
APIEndPoint(app=self, name='rest', version_string='1')
|
||||||
|
|
||||||
Package(label='Django REST framework', license_text='''
|
Package(label='Django REST framework', license_text='''
|
||||||
|
|||||||
@@ -261,3 +261,5 @@ SWAGGER_SETTINGS = {
|
|||||||
# ------ Timezone --------
|
# ------ Timezone --------
|
||||||
TIMEZONE_COOKIE_NAME = 'django_timezone'
|
TIMEZONE_COOKIE_NAME = 'django_timezone'
|
||||||
TIMEZONE_SESSION_KEY = 'django_timezone'
|
TIMEZONE_SESSION_KEY = 'django_timezone'
|
||||||
|
# ----- Stronghold -------
|
||||||
|
STRONGHOLD_PUBLIC_URLS = (r'^/docs/.+$',)
|
||||||
|
|||||||
Reference in New Issue
Block a user