Monday, January 20, 2014

Re: How to hide the "save and add another" button in admin page?

If your method ModelAdmin.has_add_permission() returns always False even a superuser can't add the initial entry using the admin. But you can:

  • Add the initial entry using the command line.
  • Write a more complex has_add_permission method that checks if the request.user is a superuser or checks if  the initial entry already exists.

e.p.

Il giorno 19/gen/2014, alle ore 18:34, RLF_UNIQUE <rlfunique@gmail.com> ha scritto:

Ah I see, give a user change permission but not add or remove? Then just use superaccount to make initial entry?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f2b936f2-7107-4dad-bd3a-364cae68cb37%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate