Re: Removing Save functionality from Admin
Thanks Denis, that fixed the issue. One more question, is it possible to display an image in the edit form? I don't want the admin to upload any image but i want to display whatever image is uploaded on the edit form, is it possible? I googled but could not find any relevant results. Thanks Regards, Swaroop Shankar V On Thu, Jan 12, 2012 at 10:34 PM, Denis Darii wrote: > You can rewrite the *has_add_permission* method of your admin class and > return False. > More info here: > https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin. > has_add_permission > > On Thu, Jan 12, 2012 at 5:51 PM, Swaroop Shankar V wrote: > >> Hi All, >> I guess the question was not clear and am sorry for that. I have a model >> by the name Photos. I have enabled the admin section for this model. >> I don't want the admin to create any entries for this models from the admin >> area, so i need to remove the 'Add Photos' button on top of the Photos >> listing page. How can it be done? Hope my question is much more clear now. >> Thanks >> >> Regards, >> >> Swaroop Shankar V >> >> >> >> >> On Thu, Jan 12, 2012 at 2:53 PM, Swaroop Shankar V >> wrote: >> >>> Hi, >>> >>> I have a model called Photos, I would like to remove the save button and >>> functionality from the admin area for photos model. Is it possible? >>> >>> Thanks and Regards, >>> >>> Swaroop Shankar V >>> >>> >> -- >> 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 >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > This e-mail and any file transmitted with it is intended only for the > person or entity to which is addressed and may contain information that is > privileged, confidential or otherwise protected from disclosure. Copying, > dissemination or use of this e-mail or the information herein by anyone > other than the intended recipient is prohibited. If you are not the > intended recipient, please notify the sender immediately by return e-mail, > delete this communication and destroy all copies. > > -- > 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 > django-users+unsubscr...@googlegroups.com. > 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 django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Removing Save functionality from Admin
You can rewrite the *has_add_permission* method of your admin class and return False. More info here: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin. has_add_permission On Thu, Jan 12, 2012 at 5:51 PM, Swaroop Shankar V wrote: > Hi All, > I guess the question was not clear and am sorry for that. I have a model > by the name Photos. I have enabled the admin section for this model. > I don't want the admin to create any entries for this models from the admin > area, so i need to remove the 'Add Photos' button on top of the Photos > listing page. How can it be done? Hope my question is much more clear now. > Thanks > > Regards, > > Swaroop Shankar V > > > > > On Thu, Jan 12, 2012 at 2:53 PM, Swaroop Shankar V wrote: > >> Hi, >> >> I have a model called Photos, I would like to remove the save button and >> functionality from the admin area for photos model. Is it possible? >> >> Thanks and Regards, >> >> Swaroop Shankar V >> >> > -- > 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 > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- This e-mail and any file transmitted with it is intended only for the person or entity to which is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Removing Save functionality from Admin
Hi All, I guess the question was not clear and am sorry for that. I have a model by the name Photos. I have enabled the admin section for this model. I don't want the admin to create any entries for this models from the admin area, so i need to remove the 'Add Photos' button on top of the Photos listing page. How can it be done? Hope my question is much more clear now. Thanks Regards, Swaroop Shankar V On Thu, Jan 12, 2012 at 2:53 PM, Swaroop Shankar V wrote: > Hi, > > I have a model called Photos, I would like to remove the save button and > functionality from the admin area for photos model. Is it possible? > > Thanks and Regards, > > Swaroop Shankar V > > -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.