Skip to content

Commit

Permalink
fix(settings): replace os.path with pathlib.Path
Browse files Browse the repository at this point in the history
  • Loading branch information
b1rger committed Dec 17, 2024
1 parent d60dfbb commit d0c77ba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apis_acdhch_default_settings/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import re
from typing import Any, Dict
from pathlib import Path

from django.core.management.utils import get_random_secret_key
import dj_database_url
Expand All @@ -25,10 +26,7 @@

SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key())

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(
os.path.dirname(os.path.abspath(os.path.join(__file__, "../")))
)
BASE_DIR = Path(__file__).resolve().parent.parent

# Application definition
# put apis_override_select2js at the beginning of the list
Expand Down

0 comments on commit d0c77ba

Please sign in to comment.