Просмотр исходного кода

Removed tags from the admin UI

Jeremy Stretch 6 лет назад
Родитель
Сommit
75b4ba2c3a
2 измененных файлов с 2 добавлено и 13 удалено
  1. 2 1
      CHANGELOG.md
  2. 0 12
      netbox/netbox/admin.py

+ 2 - 1
CHANGELOG.md

@@ -97,7 +97,8 @@ the Config Context from being included in any results.
 
 NetBox now makes use of its own `Tag` model instead of the vanilla model which ships with django-taggit. This new model
 lives in the `extras` app and thus any permissions that you may have configured using "Taggit | Tag" should be changed
-to now use "Extras | Tag."
+to now use "Extras | Tag." Also note that the admin interface for tags has been removed as it was redundant to the
+functionality provided by the front end UI.
 
 ## Enhancements
 

+ 0 - 12
netbox/netbox/admin.py

@@ -2,17 +2,6 @@ from django.conf import settings
 from django.contrib.admin import AdminSite
 from django.contrib.auth.admin import GroupAdmin, UserAdmin
 from django.contrib.auth.models import Group, User
-from taggit.admin import TagAdmin, TaggedItemInline
-
-from extras.models import Tag, TaggedItem
-
-
-class NetBoxTaggedItemInline(TaggedItemInline):
-    model = TaggedItem
-
-
-class NetBoxTagAdmin(TagAdmin):
-    inlines = [NetBoxTaggedItemInline]
 
 
 class NetBoxAdminSite(AdminSite):
@@ -29,7 +18,6 @@ admin_site = NetBoxAdminSite(name='admin')
 # Register external models
 admin_site.register(Group, GroupAdmin)
 admin_site.register(User, UserAdmin)
-admin_site.register(Tag, NetBoxTagAdmin)
 
 # Modify the template to include an RQ link if django_rq is installed (see RQ_SHOW_ADMIN_LINK)
 if settings.WEBHOOKS_ENABLED: