Questions tagged [wagtail-streamfield]

Wagtail-streamfield is the feature of Wagtail which let you create a sequence of blocks of different types to be rearranged as desired. Build and arrange your content blocks in any order: headings, paragraphs, images, video, and custom content types specific to your site.

Wagtail is a CMS for Django. Wagtail comes up with lots of features and wagtail-streamfield is one of it. It allows a user to build and arranges content blocks in any order: headings, paragraphs, images, video, and custom content types specific to a site. enter image description here

The outstanding characteristic of it is "Better Rich Text", "Classy Implementation","Simple Editing","Content economy".

170 questions
1
vote
1 answer

Carousel Model Definition or Block

What is the difference in these two implementations of creating a carousel? They both seem to do the same thing, however one has Foreign Keys explicitly defined. The first implementation can easily be plugged in by calling it, meanwhile the second…
0
votes
1 answer

In Wagtail how can I access the Page object from inside the StructBlock template?

I have a page called Event For the event I would like to have a program. Program consists of ProgramEntry objects linked to the page with ParentalKey. I would like this program to be displayed in the html, but it should be in a streamfield so that…
moddayjob
  • 606
  • 5
  • 17
0
votes
1 answer

Is there any way to recover Streamfield data that was lost due to lack of migration?

I pushed changes to StreamFields in my models (i.e., adding new block types) without creating Migrations, as specified in the docs. This resulted in a large loss of user data, and unfortunately there isn't a recent database backup. If I were to go…
0
votes
0 answers

Any way to use CRUD in Wagtail(Django) without reload page?

I'm talking about a table with data from a model (like Django). So that the visitor can make changes to the table fields without reloading the page. The description of the framework shows several options for developing such a solution in…
0
votes
1 answer

How to Disable Certain Block Types in Wagtail's StreamField Based on Selected Theme?

In the editor's interface I have a field where the editor can choose a theme for his Page: Theme field The theme defines the styles for the blocks created in the StreamField "body" when the Page is served, however there are some themes which do not…
Gregori
  • 3
  • 2
0
votes
0 answers

Unable to get formFields from callable ChoiceBlock in StreamField

Unable to get formFields from callable ChoiceBlock in StreamField I was using a ChooserBlock to get Forms in a dropdown list in a StreamField on my page but now I am upgrading my wagtail version from 3.0 to 4.0.4 in which I refered that ChooserBlock…
0
votes
1 answer

How to avoid wagtail nested rendering in the admin panel?

let's say I have two models like below: class Field1Stream(blocks.StreamBlock): button1 = AnotherBlock(label="button main") button2 = AnotherBlock(label="button secondary") class Meta: icon = "link" required = False …
Mamed
  • 95
  • 4
  • 16
0
votes
1 answer

Wagtall - template class for blocks StreamField

I have a Strucktblock: # blocks.py class GameBlock(StructBlock): logo = ImageChooserBlock(required=True) image = ImageChooserBlock(required=True) heading = CharBlock(required=True, max_length=50) description =…
Vlad
  • 3
  • 1
0
votes
0 answers

Wagtail CMS Layout

I want to create (or use) different layouts in Wagtail CMS. Such as HEADER left-content-right FOOTER HEADER left-content FOOTER HEADER content-right FOOTER I want to create a page. Then select a layout for this page. Last, I want to assign…
fdas
  • 113
  • 1
  • 1
  • 8
0
votes
1 answer

Wagtail Streamblocks

I have the following Wagtail model body for a Page type: body = StreamField( [ ( "main", MainHeadingBlock(), ), ( …
DanB-Web
  • 33
  • 1
  • 6
0
votes
1 answer

How to programatically create a Wagtail StructBlock containing a StreamField?

I have defined a custom StructBlock with a StreamField allowing StructBlock instances, such as follows: class NavigationPageChooserBlock(wagtail_blocks.StructBlock): title = wagtail_blocks.CharBlock() page =…
Brylie Christopher Oxley
  • 1,684
  • 1
  • 17
  • 34
0
votes
1 answer

Remove html from RichTextField

I'm trying to remove the html code that wraps the RichTextField content, I thought I could do it using "raw_data" but that doesn't seem to work. I could use regex to remove it but there must be a wagtail/django way to do this? for block in…
squidg
  • 451
  • 6
  • 17
0
votes
1 answer

How to set/define the value for the label in the minimap

Since Wagtail 4.1 a new minimap component is available in the editor interface. For newly added blocks, the defined icon and the Meta class label of a subclassed StructBlock are shown. However, after saving the page, the first field/block of the…
JanMalte
  • 934
  • 6
  • 17
0
votes
0 answers

Using Wagatil Admin widgets on Public Front end

I have Streamfields and some custom StructBlocks, StreamBlocks and RichText on wagatil Pages & Models. Which are very easy to edit when I'm logged in as an Admin. However I would like my end users to create and Edit these fields using the widgest…
0
votes
2 answers

Django Wagtail dynamically create form without new model

How would I allow my primary user to dynamically create forms they can issue to their end clients. Each of my primary users has their own unique information they would like to collect that I do not know before hand. I would like to avoid creating…