mirror of
https://github.com/django-components/django-components.git
synced 2025-08-22 15:04:03 +00:00
Don't rely on BASE_DIR being a Path.
This commit is contained in:
parent
f3350ced11
commit
a32128a420
2 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ Modify STATICFILES_DIRS (or add it if you don't have it) so django can find your
|
||||||
```python
|
```python
|
||||||
STATICFILES_DIRS = [
|
STATICFILES_DIRS = [
|
||||||
...,
|
...,
|
||||||
BASE_DIR / "components",
|
os.path.join(BASE_DIR, "components"),
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Loader(FilesystemLoader):
|
||||||
directories = set(get_app_template_dirs(component_dir))
|
directories = set(get_app_template_dirs(component_dir))
|
||||||
|
|
||||||
if hasattr(settings, "BASE_DIR"):
|
if hasattr(settings, "BASE_DIR"):
|
||||||
path = (settings.BASE_DIR / component_dir).resolve()
|
path = (Path(settings.BASE_DIR) / component_dir).resolve()
|
||||||
if path.is_dir():
|
if path.is_dir():
|
||||||
directories.add(path)
|
directories.add(path)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue