Re: read only in Admin interface
On Jan 16, 3:49 am, Serxio <[EMAIL PROTECTED]> wrote: > Overriding the admin/change_form.html template, and wiping out the > line {% submit_row %} may do the trick. If that only hides the HTML, it won't be safe at all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
Hi! Overriding the admin/change_form.html template, and wiping out the line {% submit_row %} may do the trick. Of course, it's not perfect, but can help. Regards, Serxio. On 8 ene, 17:17, Nader <[EMAIL PROTECTED]> wrote: > Hello, > > I have looked while for a answer to my problem but unfortunately I > haven't found a one, maybe I had to spend more time. However I have a > project with some applications. By using ofAdminwe can Create, Read, > Update and Delete (CRUD) models information in the project. But in > one application I would like only to read the model and could not > use Create, Update and Delete capabilities. Would somebody tell me > how I can solve this problem by using ofAdmininterface? > > Regards, > > Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
Hello, This past summer I did exactly this using newforms-admin. I can't remember off the top of my head how I did it, and I don't have access to my code, but I'd suggest looking there first. I remember that it wasn't too difficult, actually. Hope that helps! Thanks, Eric Florenzano On Jan 8, 10:17 am, Nader <[EMAIL PROTECTED]> wrote: > Hello, > > I have looked while for a answer to my problem but unfortunately I > haven't found a one, maybe I had to spend more time. However I have a > project with some applications. By using of Admin we can Create, Read, > Update and Delete (CRUD) models information in the project. But in > one application I would like only to read the model and could not > use Create, Update and Delete capabilities. Would somebody tell me > how I can solve this problem by using of Admin interface? > > Regards, > > Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
On 09-Jan-08, at 12:14 AM, James Bennett wrote: >> Another dirty solution would be to simply create a user account, and >> give it permissions to only view things. I haven't played with >> permissions at all, but I imagine it would be possible. >> The correct way is still to write your own code to do it. > > No, that won't work. The Django admin operates on three permissions: > "add", "change" and "delete". There is no "view but make no > modifications" permission, hence there is no way to apply such a > restriction without doing significant custom coding. the correct way is to only give admin rights to those you can trust to read and not edit. Any one else should be handled outside admin - after all 2 lines of extra code needs to be written. -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ Foss Conference for the common man: http://registration.fossconf.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
On Jan 8, 2008 12:14 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > Another dirty solution would be to simply create a user account, and > give it permissions to only view things. I haven't played with > permissions at all, but I imagine it would be possible. > The correct way is still to write your own code to do it. No, that won't work. The Django admin operates on three permissions: "add", "change" and "delete". There is no "view but make no modifications" permission, hence there is no way to apply such a restriction without doing significant custom coding. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
James Bennett wrote: On Jan 8, 2008 10:17 AM, Nader <[EMAIL PROTECTED]> wrote: I have looked while for a answer to my problem but unfortunately I haven't found a one, maybe I had to spend more time. However I have a project with some applications. By using of Admin we can Create, Read, Update and Delete (CRUD) models information in the project. But in one application I would like only to read the model and could not use Create, Update and Delete capabilities. Would somebody tell me how I can solve this problem by using of Admin interface? As you'll find by searching the archives of this list, this is not something the Django admin interface is designed to support, and so any solution will need to come entirely from you writing your own code. Another dirty solution would be to simply create a user account, and give it permissions to only view things. I haven't played with permissions at all, but I imagine it would be possible. The correct way is still to write your own code to do it. Jeff Anderson signature.asc Description: OpenPGP digital signature
Re: read only in Admin interface
>> one application I would like only to read the model and could not >> use Create, Update and Delete capabilities. Would somebody tell me >> how I can solve this problem by using of Admin interface? > > As you'll find by searching the archives of this list, this is not > something the Django admin interface is designed to support, and so > any solution will need to come entirely from you writing your own > code. The lazy way out might be to serve from a custom settings.py that uses a DB login with read-only access...it may not stop the user from *trying* to make changes, but the DB will complain if they do try. -tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
Look at the databrowse application http://www.djangoproject.com/documentation/databrowse/ On 8 янв, 19:17, Nader <[EMAIL PROTECTED]> wrote: > Hello, > > I have looked while for a answer to my problem but unfortunately I > haven't found a one, maybe I had to spend more time. However I have a > project with some applications. By using of Admin we can Create, Read, > Update and Delete (CRUD) models information in the project. But in > one application I would like only to read the model and could not > use Create, Update and Delete capabilities. Would somebody tell me > how I can solve this problem by using of Admin interface? > > Regards, > > Nader --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: read only in Admin interface
On Jan 8, 2008 10:17 AM, Nader <[EMAIL PROTECTED]> wrote: > I have looked while for a answer to my problem but unfortunately I > haven't found a one, maybe I had to spend more time. However I have a > project with some applications. By using of Admin we can Create, Read, > Update and Delete (CRUD) models information in the project. But in > one application I would like only to read the model and could not > use Create, Update and Delete capabilities. Would somebody tell me > how I can solve this problem by using of Admin interface? As you'll find by searching the archives of this list, this is not something the Django admin interface is designed to support, and so any solution will need to come entirely from you writing your own code. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~--~~~~--~~--~--~---