Re: Potential admin bug

2022-08-04 Thread Fab
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. On Thursday, 4 Au

Re: Potential admin bug

2022-08-04 Thread Fab
Looks like "_addanother" isn't in the request.POST: https://github.com/django/django/blob/main/django/contrib/admin/options.py#L1388 The name on the input isn't being passed with the form submit: https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/submit_line.html#L

Re: Potential admin bug

2022-08-03 Thread Adebileje Nurudeen
I'll get back to you On Wed, Aug 3, 2022, 8:37 PM Ross Meredith wrote: > It's more likely a set up problem than a bug I'd have thought. > > If it helps here is the relevant code - > https://github.com/django/django/blob/main/django/contrib/admin/options.py#L132 > . > > def response_add is the me

Re: Potential admin bug

2022-08-03 Thread Adebileje Nurudeen
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 wrote: > 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 t

Re: Potential admin bug

2022-08-03 Thread Ross Meredith
It's more likely a set up problem than a bug I'd have thought. If it helps here is the relevant code - https://github.com/django/django/blob/main/django/contrib/admin/options.py#L132 . def response_add is the method which determines what the response to use after a successful addition. On Wed, A

Potential admin bug

2022-08-03 Thread Fab
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 butto