Last active
December 1, 2015 12:42
-
-
Save Brick85/b9188df039096d47b494 to your computer and use it in GitHub Desktop.
django admin methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_actions(self, request): | |
actions = super(type(self), self).get_actions(request) | |
if 'delete_selected' in actions: | |
del actions['delete_selected'] | |
return actions | |
def has_delete_permission(self, request, obj=None): | |
return False | |
def save_related(self, request, form, formsets, change): | |
super(type(self), self).save_related(request, form, formsets, change) | |
form.instance.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment