You can use something like Mezzanine Blocks https://github.com/renyi/mezzanine-blocks to insert various "blocks" within a page (nb not a Page, as such). The blocks can be added to pages by a specific template tag and then you treat each block as if it were its own Rich Text (or other) page, kind of. Have a read of the readme file at that link.
There are other similar packages out there too. Seeya. Danny. On 14 March 2017 at 09:27, <[email protected]> wrote: > I've read through the docs but I'm still not clear on how I can create a > page with multiple rich text fields. I've tried > > from django.db import models > from mezzanine.pages.models import Page, RichText > > class Club(Page, RichText): > club_description = RichText("club description") > # ... > > and then an admin.py with: > > from copy import deepcopy > from django.contrib import admin > from mezzanine.pages.admin import PageAdmin > from .models import Club > > club_extra_fieldsets = ( > (None, { > "fields": ( > "club_description", > "...", > ) > }), > ) > > class ClubAdmin(PageAdmin): > inlines = () > fieldsets = deepcopy(PageAdmin.fieldsets) + club_extra_fieldsets > > admin.site.register(Club, ClubAdmin) > > But this does not give a rich text field when I hit up the admin and > create a new "Club" page. Instead it errors out with a message that > "club_description" is an unknown field. Is there any documentation on how > to add multiple (or even one) rich text field to a page? > > -- Mike "Pomax" Kamermans > > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
