diff --git a/project/urls.py b/project/urls.py index 141c462..8bc57cc 100644 --- a/project/urls.py +++ b/project/urls.py @@ -1,8 +1,9 @@ from django.contrib import admin from django.conf import settings from django.conf.urls.static import static -from django.urls import path, include +from django.urls import path, include, re_path from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView +from django.views.generic import TemplateView urlpatterns = [ path('admin/', admin.site.urls), @@ -17,6 +18,8 @@ # API schema path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'), + # Invalid path + re_path(r'^.*', TemplateView.as_view(template_name='index.html')), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..b9ce033 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,24 @@ + + +
+ + + +