From 42e4b904eb672a43fe15f1bad4b87ee5f8651913 Mon Sep 17 00:00:00 2001 From: Leandro Roberto Date: Mon, 11 Feb 2019 22:11:29 -0200 Subject: [PATCH] =?UTF-8?q?add=20vari=C3=A1vel=20de=20ambiente=20SITE=5FUR?= =?UTF-8?q?L?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/api/urls.py | 2 +- sapl/settings.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/api/urls.py b/sapl/api/urls.py index 3fba0ea63..e794a4e20 100644 --- a/sapl/api/urls.py +++ b/sapl/api/urls.py @@ -4,7 +4,6 @@ from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions from rest_framework.routers import DefaultRouter -from rest_framework_swagger.views import get_swagger_view from sapl.api.views import (AutoresPossiveisListView, AutoresProvaveisListView, AutorListView, MateriaLegislativaViewSet, @@ -48,6 +47,7 @@ schema_view = get_schema_view( default_version='v1', description="Sapl API - Docs - Configuração Básica", ), + url=settings.SITE_URL, public=True, permission_classes=(permissions.AllowAny,), ) diff --git a/sapl/settings.py b/sapl/settings.py index 113902da0..a44b3f73e 100755 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -145,6 +145,7 @@ if DEBUG: MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware', ] INTERNAL_IPS = ('127.0.0.1') +SITE_URL = config('SITE_URL', cast=str, default='') CACHES = { 'default': {