0

I have Streamfields and some custom StructBlocks, StreamBlocks and RichText on wagatil Pages & Models. Which are very easy to edit when I'm logged in as an Admin.

However I would like my end users to create and Edit these fields using the widgest available to me in the admin. How do i expose them to the public without giving them the ability to login to my admin?

I cam across this article that looked promising but ultimatley I got an error and couldn't test.

from wagtail.admin.forms.models import WagtailAdminModelForm

class FeaturedImage(models.Model):
    date = models.DateField()


class FeaturedImageForm(WagtailAdminModelForm):
    class Meta:
        model = FeaturedImage
        fields = ['date']

raise AppRegistryNotReady("Models aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

What i want to know is am i working in the correct direction? If so how do I resolve the above error?

sqwale
  • 554
  • 3
  • 24
  • Could you describe a bit more about what you are trying to do? My advice would be to allow users to log into the admin interface, but to put them into groups that have very restricted permissions - for example only allowing them edit permission on a section of the page tree or only permissions on some kinds of ModelAdmin objects. Have a look at https://docs.wagtail.org/en/latest/topics/permissions.html and then tell us a bit more about your use case and we can advise you better. – cnk Jan 26 '23 at 21:07

0 Answers0