Sunday, January 29, 2012

superuser unable to delete an object


in admin I have this code:

class ChildAdmin(admin.ModelAdmin):
def has_change_permission(self, request,obj=None):
# obj is the child and we fetch the project associated with the
child through
# the area.
if request.user.is_superuser:
return True
if obj == None:
return True
return True
return False
def has_delete_permission(self, request, obj=None):
# Same as change permission
self.has_change_permission(request, obj=obj)

when I login as superuser and try to delete a child object I get a 403
forbidden error. Any clues?
Kenneth Gonsalves

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment