diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-15 16:28:13 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-15 16:28:13 -0500 |
commit | 548ed0739f559656aba6eda379ee65159640fba2 (patch) | |
tree | 88af1b586acea3d8cc97b7502bbf97229ce5e33b /app/pages/views.py | |
parent | 50a253bbd77fc2803a0fcb12316a781407f3867d (diff) |
fixed templates for multiple sites in pages
Diffstat (limited to 'app/pages/views.py')
-rw-r--r-- | app/pages/views.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/pages/views.py b/app/pages/views.py index ed8d380..1356729 100644 --- a/app/pages/views.py +++ b/app/pages/views.py @@ -11,13 +11,17 @@ class PageDetailView(LuxDetailView): def get_template_names(self): obj = self.get_object() - return ["pages/%s.html" % obj.slug, 'pages/page_detail.html'] + return ["pages/%s/%s.html" % (obj.site.display_name, obj.slug), \ + 'pages/%spage_detail.html'% obj.site.display_name] class PageDetailTXTView(LuxDetailView): model = Page slug_field = "slug" - template_name = "pages/page_detail.txt" + + def get_template_names(self): + obj = self.get_object() + return 'pages/%spage_detail.txt'% obj.site.display_name class HomePageList(DetailView): |