mirror of
https://github.com/django-components/django-components.git
synced 2025-08-03 22:08:17 +00:00
Can't use wahlrus operator in old pythons.
This commit is contained in:
parent
46533000cb
commit
681c540cb7
1 changed files with 4 additions and 4 deletions
|
@ -15,12 +15,12 @@ class Loader(FilesystemLoader):
|
|||
directories = list(get_app_template_dirs(component_dir))
|
||||
settings_path = Path(*settings.SETTINGS_MODULE.split("."))
|
||||
|
||||
if (path := (settings_path / ".." / component_dir).resolve()).is_dir():
|
||||
path = (settings_path / ".." / component_dir).resolve()
|
||||
if path.is_dir():
|
||||
directories.append(path)
|
||||
|
||||
if (
|
||||
path := (settings_path / ".." / ".." / component_dir).resolve()
|
||||
).is_dir():
|
||||
path = (settings_path / ".." / ".." / component_dir).resolve()
|
||||
if path.is_dir():
|
||||
directories.append(path)
|
||||
|
||||
return directories
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue