mirror of
https://github.com/django-components/django-components.git
synced 2025-08-09 08:48:00 +00:00
Make sure BASE_DIR is a Path
This commit is contained in:
parent
f7846b9c0a
commit
d1224c13c9
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
import re
|
import re
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Dict, List, Tuple, Union
|
from typing import TYPE_CHECKING, Dict, List, Tuple, Union
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
@ -101,7 +102,8 @@ class AppSettings:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def DIRS(self) -> List[Union[str, Tuple[str, str]]]:
|
def DIRS(self) -> List[Union[str, Tuple[str, str]]]:
|
||||||
return self.settings.get("dirs", [settings.BASE_DIR / "components"])
|
base_dir_path = Path(settings.BASE_DIR)
|
||||||
|
return self.settings.get("dirs", [base_dir_path / "components"])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def APP_DIRS(self) -> List[str]:
|
def APP_DIRS(self) -> List[str]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue