Re: ModelAdmin.has_change_permission gives 403

2014-11-26 Thread Mike Dewhirst
Simon Thank you. Yes I had thought that if/else was a last resort possibility. However, one of the nice features I wanted to retain is "Save as" to let a user copy the records. By the way there are many 1:1 and 1:n records connected to substance. I haven't seen flatten_fieldsets before so I'll

Re: ModelAdmin.has_change_permission gives 403

2014-11-26 Thread Simon Charette
In order to make a model admin read only I suggest you make sure ` get_readonly_fields() ` return all of them. from django.contrib.admin.utils import flatten_fieldsets def get_readonl

Re: ModelAdmin.has_change_permission gives 403

2014-11-25 Thread Mike Dewhirst
On 26/11/2014 11:59 AM, Mike Dewhirst wrote: 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. Actually, I mu

ModelAdmin.has_change_permission gives 403

2014-11-25 Thread Mike Dewhirst
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 e