⚙️ settings

Modern Django settings

Use Pathlib in Django Settings File:

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent

Last updated

Was this helpful?