Skip to content

Commit 4763e8d

Browse files
authored
docs: action form (#527)
1 parent 3445287 commit 4763e8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ class SomeForm(forms.Form):
490490
@register(User)
491491
class UserAdmin(ModelAdmin):
492492
actions_detail = ["change_detail_action_block"]
493-
form = SomeForm(request.POST or None)
494493

495494
@action(description=_("Detail"))
496495
def change_detail_action_block(self, request: HttpRequest, object_id: int) -> str:
496+
form = SomeForm(request.POST or None)
497497
user = User.objects.get(pk=object_id)
498498

499499
if request.method == "POST" and form.is_valid():

0 commit comments

Comments
 (0)