diff --git a/app/app/settings.py b/app/app/settings.py index a204a563..1163ddbb 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -92,7 +92,7 @@ ROOT_URLCONF = 'app.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [path.join(BASE_DIR, 'server/templates'), path.join(BASE_DIR, 'authentification/templates')], + 'DIRS': [path.join(BASE_DIR, 'client/dist')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -118,12 +118,7 @@ STATIC_URL = '/static/' STATIC_ROOT = path.join(BASE_DIR, 'staticfiles') STATICFILES_DIRS = [ - static_path - for static_path in ( - path.join(BASE_DIR, 'server', 'static', 'assets'), - path.join(BASE_DIR, 'server', 'static', 'static'), - ) - if path.isdir(static_path) + path.join(BASE_DIR, 'client/dist/static'), ] STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' diff --git a/app/app/urls.py b/app/app/urls.py index a71ac815..2bd7f1ea 100644 --- a/app/app/urls.py +++ b/app/app/urls.py @@ -15,8 +15,8 @@ Including another URLconf """ from django.conf import settings from django.contrib import admin -from django.urls import path, include -from django.contrib.auth.views import PasswordResetView, LogoutView +from django.urls import path, include, re_path +from django.contrib.auth.views import PasswordResetView, LogoutView, TemplateView from drf_yasg.views import get_schema_view from drf_yasg import openapi @@ -43,6 +43,7 @@ urlpatterns = [ path('password_reset/', PasswordResetView.as_view(), name='password_reset'), path('api-auth/', include('rest_framework.urls')), path('v1/', include('api.urls')), + re_path('', TemplateView.as_view(template_name='index.html')), path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), ]