I have installed wagtail Streamforms package latest release and wagtail 2.0 , but when I created the form using it and the form content is not showning with the default form template and when I defined a custom template 'streamforms/form_block.html' still the content of the form it's not showing up.I have defined both the templates I am using in my base.py file of setting as said in the doc.
WAGTAILSTREAMFORMS_FORM_TEMPLATES = ( ('streamforms/form_block.html', 'Default Form Template'), )
But in admin panel->Streamforms when I am creating a form ,in the template chooser field it's just showing "Default Form Template"
I have defined it in models.py in streamfields and defined myself the template to show the content it not rendering still class StandardPage(Page):
class StandardPage(Page):
introduction = models.TextField(
help_text='Text to describe the page',
blank=True)
image = models.ForeignKey(
'wagtailimages.Image',
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name='+',
help_text='Landscape mode only; horizontal width between 1000px and 3000px.'
)
video_url = models.URLField(
null=True,
blank=True
)
body = StreamField([
(
'main_content',
blocks.ListBlock(BaseStreamBlock(), label='content')
),
(
'form',
blocks.ListBlock(WagtailFormBlock(), label='create form')
)
,],
blank=True,
null=True,
verbose_name="Standard Page"
)
content_panels = Page.content_panels + [
FieldPanel('introduction', classname="full"),
ImageChooserPanel('image'),
FieldPanel('video_url'),
StreamFieldPanel('body'),
]
@property
def standard_page(self):
return self.get_parent().specific
This is my "Standard_Page.html" template
{% extends "base.html" %}
{% load wagtailcore_tags wagtailtrans_tags streamforms_tags wagtailimages_tags homeapp_tags%}
{% block content%}
{% include "base/include/header.html" %}
<div class="container">
{{ page.introduction }}
{{ page.image }}
<div class="row">
<div class="col-md-7">
{% for block in page.body %}
{{ block}}
{% endfor %}
</div>
</div>
</div>
{% endblock %}
What I am doing wrong?