Reinstate old API
This commit is contained in:
parent
8c45b94aa6
commit
69f6a16cce
2 changed files with 9 additions and 4 deletions
|
@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/4.2/topics/settings/
|
||||||
For the full list of settings and their values, see
|
For the full list of settings and their values, see
|
||||||
https://docs.djangoproject.com/en/4.2/ref/settings/
|
https://docs.djangoproject.com/en/4.2/ref/settings/
|
||||||
"""
|
"""
|
||||||
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
|
@ -164,3 +164,5 @@ FOOTER_LINKS = [
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
ENABLE_OLD_API = os.getenv("MWMBL_ENABLE_OLD_API", "false").lower() == "true"
|
||||||
|
|
|
@ -16,16 +16,19 @@ Including another URLconf
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
from mwmbl.api import api_v1
|
from mwmbl.api import api_v1, api_original
|
||||||
from mwmbl.views import home_fragment, fetch_url, index
|
from mwmbl.views import home_fragment, fetch_url, index
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('api/v1/', api_v1.urls),
|
path('api/v1/', api_v1.urls),
|
||||||
path('accounts/', include('allauth.urls')),
|
path('accounts/', include('allauth.urls')),
|
||||||
|
|
||||||
path('', index, name="home"),
|
path('', index, name="index"),
|
||||||
path('app/home/', home_fragment, name="home"),
|
path('app/home/', home_fragment, name="home"),
|
||||||
path('app/fetch/', fetch_url, name="fetch_url")
|
path('app/fetch/', fetch_url, name="fetch_url"),
|
||||||
|
path('', api_original.urls),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue