Skip to content

Commit

Permalink
fixes safe_join will add the full directory path
Browse files Browse the repository at this point in the history
  • Loading branch information
smirolo committed Nov 25, 2024
1 parent 6e663b1 commit c958d23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ srcDir ?= $(realpath .)
installTop ?= $(if $(VIRTUAL_ENV),$(VIRTUAL_ENV),$(abspath $(srcDir))/.venv)
binDir ?= $(installTop)/bin
CONFIG_DIR ?= $(installTop)/etc/testsite
RUN_DIR ?= $(installTop)/var/run

installDirs ?= install -d
installFiles := install -m 644
Expand Down
3 changes: 1 addition & 2 deletions pages/views/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import logging, os

from django.http import Http404
from django.utils._os import safe_join
from django.views.generic import TemplateView

from .. import settings
Expand Down Expand Up @@ -85,7 +84,7 @@ def get_template_names(self):
for layout in get_extra(self.element, 'layouts', [])]
if self.is_prefix:
# It is not a leaf, let's return the list view
candidates += [safe_join(os.path.dirname(
candidates += [os.path.join(os.path.dirname(
self.template_name), 'index.html')]
else:
candidates += super(PageElementView, self).get_template_names()
Expand Down

0 comments on commit c958d23

Please sign in to comment.