2018-11-25 15:05:26 +00:00
|
|
|
from django.contrib import admin
|
2019-04-21 07:37:17 +00:00
|
|
|
from django.contrib.auth.models import Group
|
|
|
|
|
|
|
|
from two_factor.models import PhoneDevice
|
|
|
|
from django_otp.plugins import otp_totp, otp_static
|
|
|
|
from django_cron.models import CronJobLog
|
|
|
|
from django_celery_results.models import TaskResult
|
|
|
|
|
2019-01-24 12:04:04 +00:00
|
|
|
from .models import Organization, Device, Network, Model, Wifi, Notification
|
2018-11-25 15:05:26 +00:00
|
|
|
|
2019-04-21 07:37:17 +00:00
|
|
|
# Registering own models
|
|
|
|
|
2018-11-25 15:05:26 +00:00
|
|
|
admin.site.register(Organization)
|
|
|
|
admin.site.register(Device)
|
|
|
|
admin.site.register(Network)
|
2018-12-15 11:35:00 +00:00
|
|
|
admin.site.register(Model)
|
2018-12-23 09:37:14 +00:00
|
|
|
admin.site.register(Wifi)
|
2019-01-24 12:04:04 +00:00
|
|
|
admin.site.register(Notification)
|
2018-12-28 10:28:44 +00:00
|
|
|
|
2019-04-21 07:37:17 +00:00
|
|
|
# Unregistering unused framework models
|
2018-12-28 10:28:44 +00:00
|
|
|
|
|
|
|
admin.site.unregister(Group)
|
2019-01-17 12:19:50 +00:00
|
|
|
|
2019-04-21 07:37:17 +00:00
|
|
|
# Unregistering unused third-party module models
|
2019-01-17 12:19:50 +00:00
|
|
|
|
|
|
|
admin.site.unregister(PhoneDevice)
|
|
|
|
admin.site.unregister(otp_totp.models.TOTPDevice)
|
|
|
|
admin.site.unregister(otp_static.models.StaticDevice)
|
2019-02-01 12:25:55 +00:00
|
|
|
admin.site.unregister(CronJobLog)
|
2019-02-02 10:11:48 +00:00
|
|
|
admin.site.unregister(TaskResult)
|