yensheng
yensheng

Reputation: 1325

How to add a blank page and generate a menu using wagtail(nescode)?

I am using the open source nescode(The open source is below). https://github.com/nescode/wagtailcmsdemo

I know how to create default wagtail's page. enter image description here

It can auto create the menu on the top bar when I select the "show in menus". And the result is below: enter image description here But I don't know how to create a blank page. The blank page that I want to show highcharts figures(http://www.highcharts.com/). What is the processure for creating the page with highcharts and add the page onto the menu?

Thank you.

Upvotes: 0

Views: 542

Answers (1)

yensheng
yensheng

Reputation: 1325

I find the answer.

Step1:

Basically I add in a new model to demo > models.py as follows

class NewsPage(Page):
    body = RichTextField()
    date = models.DateField(“Post date”)
    search_name = “News Page”
    indexed_fields = (‘body’, )

    NewsPage.content_panels = [
    FieldPanel(‘title’, classname=”full title”),
    FieldPanel(‘date’),
    FieldPanel(‘body’, classname=”full”),
    ]

Step2:

./manage.py migrate

Step3:

add file news_page.html enter image description here

Step4:

Finaly you can see the button that can create the news_page. enter image description here

Upvotes: 1

Related Questions