Closed joahim closed 2 years ago
Is there an easy way to override the save method when creating objects within the chooser? Similar to Django admin's save_model mechanism.
In my case, I would need to set the current user (from request) on the object being created.
This can be done by overriding the form_valid method:
form_valid
https://github.com/wagtail/wagtail-generic-chooser/blob/7d26029dd10d0a1e1f67fb39f0a9a768df47bce0/generic_chooser/views.py#L457-L462
Is there an easy way to override the save method when creating objects within the chooser? Similar to Django admin's save_model mechanism.
In my case, I would need to set the current user (from request) on the object being created.