Skip to content
Advertisement

Tag: wagtail

Django/Wagtail Snippet Serializer in API

I have added wagtail CMS’s blog author in my ‘models.py’ also exposed it in API, but it’s showing like this in API Here’s the models.py code How do I serialize like this show author name, website, image and id? I tried to Serialize the BlogAuthor And here is the API field APIField(“blog_authors”, serializer=AuthorSerializer(many=True)), When I runserver I got this error

Edit Form Submit handler for a Model

I have a fairly simple django model in a Wagtail CMS; essentially: I need to perform an action when this model is saved via the Wagtail model edit form (eg /admin/section/thingy/123/edit). Currently, I have registered a post_save signal, however this has resulted in the method being called when the model is saved programmatically (via an import sync task). I’ve had

no such table: wagtailcore_site

I’m hosting two websites on ubuntu server and both having postgresql, the first one is working prefect but the second give me this error no such table: wagtailcore_site Request Method: GET Django Version: 2.2.10 Exception Type: OperationalError Exception Value: no such table: wagtailcore_site Exception Location: /home/project2/.venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 383 Python Executable: /home/project2/.venv/bin/python3.7m Python Version: 3.7.3 database settings for first

How to break lines when using wagtail BlockQuoteBlock?

I have this model: When I’m saving page with some text using blockquote I use some line breakes and even <br> tags: But on the page there are no line breaks after it: So how to make this work and save line breaks? I’m using wagtail 1.13.1. Answer I think it was done because of security reasons. But It is

How to change django wagtail’s admin logo

I am working on a small project and I thought I’d give wagtail a try. I am now wondering how I could change wagtail’s admin logo in the sidebar (top left image on the picture bellow). I could change /static/wagtailadmin/images/wagtail-logo.svg directly but it’d be wrong ;). Answer Wagtail already provide the solution in the official documentation using django-overextends: To replace

Advertisement