Exclude root API and API doc URLs.

This commit is contained in:
Roberto Rosario
2016-03-14 04:15:13 -04:00
parent 3fa9092d57
commit 35cc0ea1d6
2 changed files with 5 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
from __future__ import unicode_literals
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig, menu_tools
@@ -17,6 +18,8 @@ class RESTAPIApp(MayanAppConfig):
def ready(self):
super(RESTAPIApp, self).ready()
settings.STRONGHOLD_PUBLIC_URLS += (r'^/%s/.+$' % self.app_url,)
APIEndPoint(app=self, name='rest', version_string='1')
Package(label='Django REST framework', license_text='''

View File

@@ -261,3 +261,5 @@ SWAGGER_SETTINGS = {
# ------ Timezone --------
TIMEZONE_COOKIE_NAME = 'django_timezone'
TIMEZONE_SESSION_KEY = 'django_timezone'
# ----- Stronghold -------
STRONGHOLD_PUBLIC_URLS = (r'^/docs/.+$',)