>
> You could make such a check and deny the saving of a new FrontPage
> object by overloading the save() method of class FrontPage.
> Source in trunk: django/db/models/base.py.
>
> Regards, James.

Thanks James.

Yes - I see that would work - but it involves coding and I was looking
for a more 'declarative'
way.

After posting I thought of the following (WHY is it always AFTER
posting??).

I'll give the user permission to change a FrontPage instance but not
delete or add one. The real admin user
will have just to avoid adding / deleting but this user ain't used
(much). In the FrontPage view I can check
that the original view is being used (perhaps by looking for pk==1 or
something).   The main thing is that this
switches off the admin template buttons 'x delete' '+add' etc.

What I was looking for was a global permission that could be set on a
model when it was defined which set
default permissions for 'staff' on the model (or even for superuser)
on that model.

Regards, Peter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to