We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 440eb9b commit aa3275cCopy full SHA for aa3275c
src/backend/urls.py
@@ -17,6 +17,7 @@
17
from django.contrib import admin
18
from django.urls import path, re_path
19
20
+from backend.env import config
21
from api.views import HomeView, HelloAPIView, AboutView, DateAPIView
22
23
djangourlpatterns = [
@@ -32,4 +33,9 @@
32
33
re_path(r"^about/$", HomeView.as_view(), name="about"),
34
]
35
-urlpatterns = djangourlpatterns + reacturlpatterns
36
+DJANGO_IN_REACT = config("DJANGO_IN_REACT", default=True, cast=bool)
37
+
38
+if DJANGO_IN_REACT:
39
+ urlpatterns = djangourlpatterns + reacturlpatterns
40
+else:
41
+ urlpatterns = djangourlpatterns
0 commit comments