move LicenseWithUserAdmin to licenses admin

This commit is contained in:
Andreas Zweili 2020-01-12 13:19:14 +01:00
parent e72da6813c
commit 0434796b47
2 changed files with 8 additions and 8 deletions

View File

@ -17,6 +17,14 @@ class LicenseWithComputerAdmin(admin.ModelAdmin):
return {}
class LicenseWithUserAdmin(admin.ModelAdmin):
def get_model_perms(self, request):
"""
Return empty perms dict thus hiding the model from admin index.
"""
return {}
class UserLicenseAdmin(admin.ModelAdmin):
model = UserLicense
extra = 0

View File

@ -36,14 +36,6 @@ class UserInMailGroupAdmin(admin.ModelAdmin):
return {}
class LicenseWithUserAdmin(admin.ModelAdmin):
def get_model_perms(self, request):
"""
Return empty perms dict thus hiding the model from admin index.
"""
return {}
class LicenseWithUserInLine(admin.StackedInline):
model = LicenseWithUser
extra = 0