Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pagemodel.py template_choices and DEFAULT_TEMPLATE aren't being used #6520

Open
@ZippoLag

Description

@ZippoLag

Summary

I was trying to overridePage'stemplate_choices andDEFAULT_TEMPLATE so I can limit the options according to a page's parent, but it appears that in at least 3 key places where those attributes should be used,get_cms_setting('TEMPLATES') is used instead, and so the selectable templates displayed are never limited like I intended.

The places I've found where this happens are theget_template andget_template_name methods. Also incms_toolbars.py for the# templates menu sectionget_cms_setting('TEMPLATES') is used rather thanself.page.template_choices.

More details about what I was trying to pull of can be found, here:https://stackoverflow.com/questions/52335541/how-to-limit-django-cms-template-choices-based-on-page-parent

Expected behaviour

template_choices andDEFAULT_TEMPLATE should define which templates are available for a Page in the CMS.

Actual behaviour

get_cms_setting('TEMPLATES') is always used instead.

Environment

  • Python version: 2.7.x
  • Django version: 1.11.x
  • django CMS version: 3.4.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp