1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Wagtail:ページを作る際のページタイプ選択肢の制限

Last updated at Posted at 2019-11-01

無題.png

上記のようにページを作成する際に表示されるモデルの選択肢を非表示にする方法。

parent_page_typesを設定する。

・全てのページで非表示にしたい場合

model.py
class Test(Page):
    parent_page_types = []

・特定のページでのみ選択肢を表示したい場合

model.py
class Test(Page):
    parent_page_types = ['app_name.page_type_name']
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?