wagtail-admin

many-to-many relationship of wagtail page model to itself?

巧了我就是萌 提交于 2021-02-10 14:47:44
问题 So i got a PlantDetailPage model with "companion" field among others (yes plants can be companions), in which I should be able to select other PlantDetailPages. I got the thing to show up, create new plants in inline (yes, a menu in the menu in the menu...), but there's few issues: 1) It just won't select them (no action on clicking "select plantdetailpage") 2) "companions" menu button is now shown on the left (like a snippet that it became?) - which I'd like to avoid. 3) I don't know how to

Guidelines for using Wagtail Pages or Django models?

眉间皱痕 提交于 2020-07-10 08:45:10
问题 For example, I want to build an ecommerce website using wagtail, one component is order. I think order should not wagtail Page, but simple Django model, see code below. from django.db import models from wagtail.admin.edit_handlers import ( FieldPanel, StreamFieldPanel, MultiFieldPanel, InlinePanel, ) from wagtail.core.fields import RichTextField from wagtail.core.models import Page # Since product details are shown to users, so need to have a Page for it. class XyzProductPage(Page): template