MultiFieldPanel ( children, heading = '', classname = None ) ¶ ![]() StreamFieldPanel ( field_name, classname = None, widget = None ) ¶Ĭhanged in version 3.0: StreamFieldPanel is no longer required for StreamField. ![]() ![]() See Django’s documentation on custom permissions for details on how to set permissions up alternatively, if you want to set a field as only available to superusers, you can use any arbitrary string (such as 'superuser') as the codename, since superusers automatically pass all permission tests. Accepts a permission codename such as 'myapp.change_blog_category' - if the logged-in user does not have that permission, the field will be omitted from the form. permission ( optional ) ¶Īllows a field to be selectively shown to users with sufficient permission. This allows you to prevent a field level comment button showing for this panel if set to True. This takes precedence over any help text set on the model field. Help text to be displayed against the field. This allows you to override the heading for the panel, which will otherwise be set automatically using the form field’s label (taken in turn from a model field’s verbose_name). This parameter allows you to specify a Django form widget to use instead of the default widget for this field type. The CSS class title can be used to give the field a larger text size, suitable for representing page titles and section headings. This is a string of optional CSS classes given to the panel which are used in formatting and scripted interactivity. This is the name of the class property used in your model definition. This is the panel used for basic Django field types. FieldPanel ( field_name, classname = None, widget = None, heading = '', disable_comments = False, permission = None ) ¶ Here are some Wagtail-specific types that you might include as fields in your models. Just define that field the normal Django way and pass the field name intoįieldPanel when defining your panels. Panel types ¶ Built-in Fields and Choosers ¶ĭjango’s field types are automatically recognised and provided with an appropriate widget for input.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |