Open lexicalunit opened 2 years ago
I hit the same issue when using "fieldsets" instead of "fields" in the inline, buttons don't render since _request
is None
Depending on what you are trying to achieve, you might just assign a dummy request (admin._request = {}
) before calling render_inline_actions
. It works for me.
Using the example for testing results in an exception at runtime.
This will fail on the line
admin.render_inline_actions(article)
because this code is invalid: https://github.com/escaped/django-inline-actions/blob/d02441339a1b5ec3d34c10a29da41157afe9df2c/inline_actions/admin.py#L81At this point in the code the HTTP Request has not been given to the Admin object, so this attribute does not exist.