Removed tags from the admin UI

This commit is contained in:
Jeremy Stretch 2019-04-16 20:59:09 -04:00
parent bf2f314cd4
commit 75b4ba2c3a
2 changed files with 2 additions and 13 deletions

View File

@ -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 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 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 ## Enhancements

View File

@ -2,17 +2,6 @@ from django.conf import settings
from django.contrib.admin import AdminSite from django.contrib.admin import AdminSite
from django.contrib.auth.admin import GroupAdmin, UserAdmin from django.contrib.auth.admin import GroupAdmin, UserAdmin
from django.contrib.auth.models import Group, User 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): class NetBoxAdminSite(AdminSite):
@ -29,7 +18,6 @@ admin_site = NetBoxAdminSite(name='admin')
# Register external models # Register external models
admin_site.register(Group, GroupAdmin) admin_site.register(Group, GroupAdmin)
admin_site.register(User, UserAdmin) 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) # Modify the template to include an RQ link if django_rq is installed (see RQ_SHOW_ADMIN_LINK)
if settings.WEBHOOKS_ENABLED: if settings.WEBHOOKS_ENABLED: