Re: Django-admin disable plus sign
Also take a look at this ticket: https://code.djangoproject.com/ticket/9071 On Fri, Dec 30, 2011 at 3:38 PM, Denis Darii wrote: > You can rewrite the *has_add_permission* method of your admin class and > return False for your user. > More info here: > https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_add_permission > > > On Fri, Dec 30, 2011 at 3:21 PM, torgia wrote: > >> If I have a model with a Foreignkey field, the django admin shows a >> plus button so you can add the related objects on the spot. Is there a >> way to disable this functionality for some models without editing user >> permission ? >> >> -- >> 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. > -- 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: Django-admin disable plus sign
You can rewrite the *has_add_permission* method of your admin class and return False for your user. More info here: https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_add_permission On Fri, Dec 30, 2011 at 3:21 PM, torgia wrote: > If I have a model with a Foreignkey field, the django admin shows a > plus button so you can add the related objects on the spot. Is there a > way to disable this functionality for some models without editing user > permission ? > > -- > 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: Django-admin disable plus sign
I know a dirty hack - try to change your field from: fld = models.ForeignKey('ModelName', ... to: fld = models.ForeignKey('package.ModelName', ... This is why I DON'T have "+" sign... but I need it :) 2011/12/30 torgia : > If I have a model with a Foreignkey field, the django admin shows a > plus button so you can add the related objects on the spot. Is there a > way to disable this functionality for some models without editing user > permission ? > > -- > 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.
Django-admin disable plus sign
If I have a model with a Foreignkey field, the django admin shows a plus button so you can add the related objects on the spot. Is there a way to disable this functionality for some models without editing user permission ? -- 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.