views:

40

answers:

1

I have a Posting app which has, as an inline, FKs to a Gallery object. The idea being that while making a Posting, a user can click to add a Gallery object to the Posting. For that purpose, I am using a raw_id_field field to pop up the window for Gallery selection.

My problem is that I don't want users to have access to modify or add Galleries; just to use the raw_id_field to browse the existing galleries because there will be too many to make a big dropdown menu feasible. Unfortunately, Django uses the permissions for adding and editing an object to determine if a user can see that pop-up even though (as far as I know) that window only allows selecting an existing object.

Is there a way to make it so that users can use the raw ID field to pop up to choose Galleries without giving them at least editing priveleges to the Gallery app, and keep the app from appearing in their app list?

I know I can define custom permissions in the Meta class of the model, but I'm less sure how to get the admin to observe them (especially without carving it up and making it harder to upgrade Django in the future).

A: 

I think I found the answer here: http://stackoverflow.com/questions/1336382/how-can-i-modify-django-to-create-view-permission

I'm essentially looking to create a view-only permission for the Gallery app, and from the responses it sounds like Django offers zero support for this and it would have to be completely custom done.

KRH