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
0
votes
2 answers

Wagtail. Ability to edit html within editor

My editors want to have an ability to edit raw html within editor. For example, we can have simple list markup:
  • Some text
Or with custom classes and event tags:
0
votes
1 answer

Wagtail embedding images with HTML

We use StreamField to allow editors to add HTML for custom layouts. We used to be able include images in by looking up the ID of the Image and an embed code: Since performing…
Zemogle
  • 584
  • 4
  • 16
0
votes
1 answer

How to override validators in Wagtail StructBlock

my code: from django.core.validators import RegexValidator URL_VALIDATOR_MESSAGE = 'Not a valid URL' URL_VALIDATOR = RegexValidator(regex='http\D+', message=URL_VALIDATOR_MESSAGE) class SezPubBlock(blocks.StructBlock): sez = blocks.ListBlock( …
nickb84
  • 591
  • 2
  • 6
  • 11
0
votes
1 answer

wagtail how to JSON serialize RichText field in ListBlock

Error: Object of type RichText is not JSON serializable. My code: class AvvisiBlock(blocks.StructBlock): avvisi = blocks.ListBlock( blocks.StructBlock( [ ("title", blocks.CharBlock(classname="full title", icon="title",…
nickb84
  • 591
  • 2
  • 6
  • 11
0
votes
0 answers

How to set-up wagtail pages

I am trying to configure a django project that uses the wagtail CMS to display the templates(the templates is already in the file) on the frontend but since it is my first time working with wagtail, I am having issues and don't know where to head…
0
votes
1 answer

Is there a way to filter the Document chooser when it's opened from a particular block's form?

I'm writing a custom StreamBlock that is designed to render a table based on the data in a given CSV file. The CSV files will be stored in the usual Document store, so the block needs to present the Document chooser to let the user pick a CSV…
coredumperror
  • 8,471
  • 6
  • 33
  • 42
0
votes
1 answer

How do you display an external link from a stream field in a template?

I'm sorry I have to ask this question because it seems so simple but I've been searching the documentation for hours looking for an answer. The scenario is: I want to let editors embed images that are also hyperlinks so the image is clickable and…
user3170530
  • 416
  • 3
  • 13
0
votes
1 answer

passing varialbeles to wagtail carousel

Using Wagtail, I need to display cards gallery where one of the feature of the card is a carousel images. I made it with images only, but when I tried to add a caption text to each carousel I had a problem to display the data. While I can display…
donbonbon
  • 81
  • 1
  • 8
0
votes
1 answer

Retrieve data from database for different wagtail app

I'm trying to create a Streamfield block that basically displays all of the posts (diagnoses) from a standard diagnoses listing page so that not only do I have a separate diagnoses page but am also able to add a diagnoses/posts block to other…
Jon C
  • 3
  • 2
0
votes
1 answer

Wagtail Page prevent asking parent page

I dont like this step, I want to add page and there should not be any parent or child. it will stand alone a page only. Like when i click on creating a page from wagtail hooks or wagtail snippet it should direct redirect me to content creating…
user12551055
0
votes
1 answer

Testing pages with streamfields in Wagtail

I'm parsing HTML in a StreamField's richtext element via get_context, and want to be able to test that the context I've made contains the relevant modifications. But I'm really struggling to create a mock/stub that has a populated StreamField. I'm…
Dragon
  • 2,017
  • 1
  • 19
  • 35
0
votes
1 answer

Wagtail streamfield not rendering as expected

I am new to Wagtail and have just successfully installed my first site with a StreamField block: class DefaultPage(Page): author = models.CharField(max_length=255, blank=True, null=True) date = models.DateField("Post date", blank=True,…
alias51
  • 8,178
  • 22
  • 94
  • 166
0
votes
1 answer

Adding User model to the StructBlock class

I'm trying to create a simple blog page with image,content,date posted and user who posted. But I don't think that wagtail allows me to put in the user model into my block. class HomePage(Page): template_name = 'home/home_page.html' …
0
votes
1 answer

Correct way of adding EmbedBlock into StreamField via code?

I have a Page model with a StreamField: from wagtail.core.fields import StreamField from wagtail.embeds.blocks import EmbedBlock class SomeModel(Page): stream_field = StreamField( [ ("embed", EmbedBlock()), ] …
Brylie Christopher Oxley
  • 1,684
  • 1
  • 17
  • 34
0
votes
1 answer

How to get the values from a Wagtail CMS Stream field panel using Django Models?

I'm building a webpage using wagtail CMS, Django, Postgresql and at the bottom of the page, I'm building a section where I would display the videos using pagination. I'm trying to retrieve the data from Django Models using all_posts =…