Add initial Django project
This commit is contained in:
parent
94aae4653c
commit
fa6af127c1
15 changed files with 1103 additions and 4 deletions
23
config/settings_utils.py
Normal file
23
config/settings_utils.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
from platformdirs import user_data_path
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_data_dir() -> Path:
|
||||
"""Get the directory where the application data will be stored.
|
||||
|
||||
This directory is created if it does not exist.
|
||||
|
||||
Returns:
|
||||
Path: The directory where the application data will be stored.
|
||||
"""
|
||||
return user_data_path(
|
||||
appauthor="TheLovinator",
|
||||
appname="Tussilago",
|
||||
ensure_exists=True,
|
||||
roaming=True,
|
||||
use_site_for_root=True,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue