Emanuele wrote: > Hi, > I'd like to give read-only access to some objects in admin interface to > selected users. I know that django admin interface is CRUD and I can > give only create/update/delete permissions to users, but is there a way > to solve my problem (other than creating my templates and use generic > views I mean)? > > BTW, by "read-only access" I mean the user can see list/detail admin > pages for certain objects without having the possibility to > modify/delete it. > > Thanks in advance, > > Emanuele > >
Currently, the admin really doesn't offer a "view only" possibility. It really is meant for administration. I can see how it could be useful, however. ----------- Musings about this issue.... Scott Pierce ( rezzrovv) once had an idea/patch that meant any field could be turned into a StaticFormField, which would just display things as text, without an html input control - this meant the same template could be used for viewing and modifying. Its clear that having the ability to turn any field into a hidden field might be useful too. There is also a noticeable inflexibility currently in the fact that we have a one to one mapping between Forms and FormField lists in automatic manipulators. One possibility is that the transformation would be delayed until the template is actually displayed, so that in the template, it would be possible to accept override the default mapping. Hard to see what effect this would have on request processing though... Another idea would be to expand on the follow concept in manipulators: rather than just putting True in as an argument for a particular field , a more informative argument could be passed, changing the mapping from field to formfield. eg reporter.ChangeManipulator(5, follow={'name': Static, 'age': SpinControl, } ) Would override the default formfields that are output. This might be useful for eg having a flashy ajax control on one page, and a bog standard control on another page, without having to create the whole manipulator yourself for the non-default version. With this version, it is pretty easy to see how the request processing would be resolved as well. No concrete ideas/plans in this area really... just throwing out ideas. Robert