Not sure if http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ will be of some help. See admin.site.disable_action('delete_selected') ; but this is only via the admin app. You could build some logic in the model by overriding the save() method, conditionally, based upon user. So your developers/administrators can have full access but 'normal' users not.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of bvdb Sent: 25 January 2011 18:20 To: Django users Subject: DB-Views or read-only tables in models A developer sometimes has to access and present data that existed before his application. Common practice is for a database administrator to define a database view (with a CREATE VIEW sql command, not to be confused with the V in MVC) and give the Django developer access to this. This is only a read access because in most cases it is not possible or desireable to allow an UPDATE on a view. Now I am new to Django, have some experience with databases - and couldn't find a "read-only attribute" when defining a model. Without knowing that a view - that is accessed with the same SELECT syntax as a table - is read-only Django would for example generate an admin interface that produces errors, and leave the user wondering why. It makes also sense in some cases to define a table read-only for a model even it is fully accessible by the Django team. Is it really not possible to define read-only access in Djangos ORM? Or maybe I just overlooked the description? -- 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. -- 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.

