torchbox / wagtail-footnotes

MIT License
20 stars 18 forks source link

Improve docs #60

Closed songproducer closed 1 year ago

songproducer commented 1 year ago

Trying to install in a fresh project in Wagtail 5.1

from wagtail_footnotes.blocks import RichTextBlockWithFootnotes
class InformationPage(BasePage):
    body = RichTextBlockWithFootnotes(blank=True)

    content_panels = Page.content_panels + [
        FieldPanel('body'),
    ]

but get class InformationPage(BasePage): ^^^^^^^^ NameError: name 'BasePage' is not defined

zerolab commented 1 year ago

this should be

from wagtail.models import Page
from wagtail_footnotes.blocks import RichTextBlockWithFootnotes

class InformationPage(Page):
    body = RichTextBlockWithFootnotes(blank=True)

    content_panels = Page.content_panels + [
        FieldPanel('body'),
    ]
zerolab commented 1 year ago

covered by #37