Il 19/01/14 02:38, RLF_UNIQUE ha scritto:
I have been trying all day. What I am doing is trying to have a model
for an "about" page, which I want to limit to 1 item. It doesn't
really make sense to have multiple "abouts". I've done everything
described here
http://stackoverflow.com/questions/13101281/in-django-admin-how-can-i-hide-save-and-continue-and-save-and-add-another-butto
but can't get it to work, it works if in the ctx update I set
show_save_and_add_another to false, but then the "save and add
another" button doesn't show up for any model.
Please help.
You should override in your ModelAdmin the method has_add_permissions
(docs here
<https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_add_permission>).
When it returns False, all the add buttons in the admin will be disabled
for that particular Model.
--
e.p.
--
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 [email protected].
To post to this group, send email to [email protected].
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/52DB9BE1.1070009%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.