You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hello,
I've created custom intermediate form for my Admin panel and the problem is, when I post that form my action is not triggered (but it is triggered when I select it to show form).
Do you have any idea what can be wrong? This use case is not well documented, and only SO question I've found is from 2011 and answer to it doesn't seem to work ( http://stackoverflow.com/questions/6689741/ )
Here's my admin code:
# admin panel code:
class GroupAdmin(admin.ModelAdmin): actions = ['add_subjects_to_group']
print("GOT REQUEST:", request) # it prints only once, and should twice :(
if 'do_action' in request.POST: print("do_action triggered") form = SubjectsForm(request.POST) if form.is_valid(): subjects = form.cleaned_data['subjects'] print("DEBUG:", subjects) return else: form = SubjectsForm()