Potential admin bug

53 views
Skip to first unread message

Fab

unread,
Aug 3, 2022, 2:09:20 PM8/3/22
to Django users
Hey,

In the admin when clicking "add model +" I fill out the fields to create my item then when I click "Save and add another" or "Save and continue editing" it redirects back to the model list view even though the item was added successfully. If I click back on to the item to edit it the buttons work how they should.

I'm not sure if this is a bug with the admin. I've tried it on 2 projects now. I'm using Django 4.1.

I uploaded a sample project so you can quickly see if the issue happens for you too.

Cheers,

Fab

Ross Meredith

unread,
Aug 3, 2022, 3:38:02 PM8/3/22
to django...@googlegroups.com
It's more likely a set up problem than a bug I'd have thought.


def response_add is the method which determines what the response to use after a successful addition.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/eb9cf313-a1c7-45b6-a254-f8f8bb4d3fddn%40googlegroups.com.

Adebileje Nurudeen

unread,
Aug 3, 2022, 6:31:27 PM8/3/22
to django...@googlegroups.com
Okay... So what exactly do you need on it?
So I can just fix it

On Wed, Aug 3, 2022 at 7:09 PM Fab <fabian...@gmail.com> wrote:
--

Adebileje Nurudeen

unread,
Aug 3, 2022, 6:31:27 PM8/3/22
to django...@googlegroups.com

Fab

unread,
Aug 4, 2022, 3:49:05 AM8/4/22
to Django users

Fab

unread,
Aug 4, 2022, 4:01:19 AM8/4/22
to Django users
Also when editing an item that has already been created "modelName" is undefined so the submit buttons don't get overridden: https://github.com/django/django/blob/main/django/contrib/admin/static/admin/js/change_form.js#L8
So works when editing, but not when adding a new item.

Fab

unread,
Aug 4, 2022, 4:04:11 AM8/4/22
to Django users

Fabian Jarrett

unread,
Aug 4, 2022, 5:08:06 AM8/4/22
to Django users
I've filed the bug now. I think I can fix it. https://code.djangoproject.com/ticket/33893
Reply all
Reply to author
Forward
0 new messages