Browse Source

add variável de ambiente SITE_URL

pull/2465/head
Leandro Roberto 6 years ago
parent
commit
42e4b904eb
  1. 2
      sapl/api/urls.py
  2. 1
      sapl/settings.py

2
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,),
)

1
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': {

Loading…
Cancel
Save