network_inventory/licenses/admin.py
Andreas Zweili e79eba2828 show all models in the admin interface
Since we decided to create many forms in the frontend the admin interface
should really be a way to access all models even the ones which aren't
accessible from the front end.
2020-06-08 17:02:15 +02:00

27 lines
564 B
Python

from django.contrib import admin
# Register your models here.
from .models import (
ComputerLicense,
LicenseWithComputer,
UserLicense,
)
class UserLicenseAdmin(admin.ModelAdmin):
model = UserLicense
extra = 0
verbose_name_plural = 'User Licenses'
class ComputerLicenseAdmin(admin.ModelAdmin):
model = ComputerLicense
extra = 0
verbose_name_plural = 'Computer Licenses'
admin.site.register(ComputerLicense, ComputerLicenseAdmin)
admin.site.register(LicenseWithComputer)
admin.site.register(UserLicense, UserLicenseAdmin)