[Python] I want to use the user that is logged in to my wagtail model [closed]

Discussão em 'Python' iniciado por Stack, Abril 9, 2025.

  1. Stack

    Stack Membro Participativo

    first of all, thank you very much in advance. I have this problem:

    I'm making a blog page with Wagtail and I would like the author to be the logged-in user, but I've tried a thousand ways and nothing works. The user is always None.

    BlogPage class (Page):
    author = models.CharField(max_length=255)


    As I mentioned before, I want that field to be the logged-in user in the Wagtail admin. My idea was to use request, but it doesn't seem to work with Wagtail.

    Continue reading...

Compartilhe esta Página