سؤال

Well, I have a django admin project. There are two models in that site which are named Book and Author. And the Author is the foreign key of Book.

In the Admin class of Author, I add Book as inline form.

For the regular user, I remove the delete permission of Book, which should prevent user from deleting any Book instance from admin site.

However, an user deleted a Book instance from Author change form page by checking the 'Delete?' check box in inline form for Book and clicking 'Save'.

I don't understand how that happened. I mean I have removed the permission. How possible user has the ability to preform deletion.

Does anyone have a clue on this?

Thanks in Advance.

هل كانت مفيدة؟

المحلول

This looks like Issue #8060. It's fixed in Django 1.4.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top