Tuesday, November 25, 2014

ModelAdmin.has_change_permission gives 403

From the docs ...

https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_change_permission

... is working nicely except it just pops up a standard error page 403
Forbidden when it returns False.

How can I intercept this in the Admin and treat it like an error
displayed like all the other validation errors generated from the
model.clean() method???

I'd like to raise a business rule violation exception on saving the model.

Thanks for any hints

Mike

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5475260D.609%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment