Skip to content

Commit

Permalink
fixes arches-level template overrides #11668 (#11686)
Browse files Browse the repository at this point in the history
* fixes arches-level template overrides #11668
  • Loading branch information
chrabyrd authored Dec 12, 2024
1 parent fefd063 commit 726c5cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion arches/settings_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
import os
from pathlib import Path
import site
import sys
from contextlib import contextmanager

from django.apps import apps
from django.conf import settings
Expand Down Expand Up @@ -96,13 +96,20 @@ def build_templates_config(
"""
directories = []
try:
# allows for manual additions to template overrides
if additional_directories:
for additional_directory in additional_directories:
directories.append(additional_directory)

# allows for application-level overrides of generic Django templates
if app_root:
directories.append(os.path.join(app_root, "templates"))

# forces Arches-level overrides of generic Django templates
directories.append(
os.path.join(Path(__file__).resolve().parent, "app", "templates")
)

return [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
Expand Down
7 changes: 4 additions & 3 deletions releases/7.6.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

### Bug Fixes and Enhancements

- Remove unnecessary creation of guardian permissions for principal user #[11564](https://github.com/archesproject/arches/issues/11564)
- Remove unnecessary creation of guardian permissions for principal user #[11564](https://github.com/archesproject/arches/issues/11564)
- Fix migration that sets the initial principal users if a user no longer exists #[11664](https://github.com/archesproject/arches/issues/11664)
- Fix Graph Designer failure when editing large graphs #[11615](https://github.com/archesproject/arches/issues/11615)
- Fix failure to download exported search results when using non file-system based storages #[11620](https://github.com/archesproject/arches/issues/11620)
- Fix Graph Designer failure when editing large graphs #[11615](https://github.com/archesproject/arches/issues/11615)
- Fix failure to download exported search results when using non file-system based storages #[11620](https://github.com/archesproject/arches/issues/11620)
- Cache resource relationship preflabels to improve report load time #[11583](https://github.com/archesproject/arches/issues/11583)
- Fix regression where Arches is no longer overriding Django admin templates #[11668](https://github.com/archesproject/arches/issues/11668)
- Fix bug causing the Edit button to not display in the map popup #[11679](https://github.com/archesproject/arches/issues/11679)

### Dependency changes:
Expand Down

0 comments on commit 726c5cf

Please sign in to comment.