Skip to content

Submit input value not in request.POST #9

@zN3utr4l

Description

@zN3utr4l

I added some more buttons in the submit_line.html as different guides say (https://stackoverflow.com/questions/67463654/add-custom-button-near-save-button-django-admin, you%20need%20to%20override%20%22change_form.).

I just don't get the value of the button I pressed, I noticed that it works with all django models, except with the admins created with etc.admin.CustomModelPage.

Not even if I try to activate the save buttons, etc like this:

def view_custom(self, request):
        context: dict = {
            'show_save_and_continue': True,
            'show_save_and_add_another': True,
            'show_save_as_new': True,
            'show_save': True,
            .........
          return self._changeform_view(request, object_id=None, form_url='', extra_context=context)

The value of the submit on click is not passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions