Integration of react

This commit is contained in:
RailTH
2024-02-01 18:06:20 +11:00
parent 82cce1e816
commit d6b97c2ccb
19 changed files with 18536 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.2/ref/settings/
"""
from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -65,8 +66,7 @@ ROOT_URLCONF = 'SusMarket.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates']
,
'DIRS': [os.path.join(BASE_DIR, 'reactapp/build')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -129,6 +129,10 @@ USE_TZ = True
STATIC_URL = 'static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'reactapp/build/static')
]
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field