Skip to content

Commit 576be6a

Browse files
committed
Use generic bind to settings
1 parent c466f5d commit 576be6a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

django_dyn_api/views.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@
1111
from rest_framework.generics import get_object_or_404
1212
from rest_framework.views import APIView
1313
from rest_framework.response import Response
14-
from core.settings import DYNAMIC_API
14+
15+
from django.conf import settings
16+
17+
DYNAMIC_API = {}
18+
19+
try:
20+
DYNAMIC_API = getattr(settings, 'DYNAMIC_API')
21+
except:
22+
pass
1523

1624
from .helpers import Utils
1725

0 commit comments

Comments
 (0)