Possible Duplicate:
Getting “Permission denied” page in the admin, while user has permission
I’ve got some issues with permissions, so I’d like to see what’s going from the shell.
Can I start the shell with a given user?
Or can I delete an object from the shell, as if I was connected to the admin with a given user?
Basically, how can I see why I’m getting a page with “Permission denied” when trying to delete an object when the user actually has the permission?
Permissions are only enforced by your business logic, so using normal Django ORM syntax in the shell will completely bypass any restrictions.
Finding the element will depend on how it is related to User, but assuming a ForeignKey called
user: