add django.setup & setting.configure in settings
This commit is contained in:
@@ -13,6 +13,10 @@ import os.path
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
import django
|
||||||
|
|
||||||
|
django.setup()
|
||||||
|
settings.configure()
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|||||||
Reference in New Issue
Block a user