Opened 11 years ago
Last modified 11 years ago
#24294 closed Bug
admin.views.decorators.staff_member_required raises an exception when passed a valid argument — at Version 1
| Reported by: | andrei kulakov | Owned by: | andrei kulakov | 
|---|---|---|---|
| Component: | contrib.admin | Version: | dev | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no | 
| Needs tests: | yes | Patch needs improvement: | no | 
| Easy pickings: | yes | UI/UX: | no | 
Description (last modified by )
When a valid argument is given to staff_member_required decorator, it raises this confusing error:
staff_member_required() takes at least 1 argument (1 given)
e.g.: 
@staff_member_required(redirect_field_name='test')
def v1(request):
return HttpResponse("hi")
  Note:
 See   TracTickets
 for help on using tickets.