Created
June 5, 2012 22:10
-
-
Save adrianholovaty/2878410 to your computer and use it in GitHub Desktop.
Userless Django admin
This file contains hidden or 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
# Does not fully work, but gets you partially there. | |
class UserlessAdminSite(admin.sites.AdminSite): | |
def check_dependencies(self): | |
pass | |
def has_permission(self, *args, **kwargs): | |
return True | |
class UserlessModelAdmin(admin.ModelAdmin): | |
def has_add_permission(self, *args, **kwargs): | |
return True | |
def has_change_permission(self, *args, **kwargs): | |
return True | |
def has_delete_permission(self, *args, **kwargs): | |
return True | |
def log_addition(self, *args, **kwargs): | |
pass | |
def log_change(self, *args, **kwargs): | |
pass | |
def log_deletion(self, *args, **kwargs): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment