from django.contrib import admin

from taggit.models import Tag, TaggedItem


class TaggedItemInline(admin.StackedInline):
    model = TaggedItem

class TagAdmin(admin.ModelAdmin):
    inlines = [
        TaggedItemInline
    ]
    ordering = ['name']

admin.site.register(Tag, TagAdmin)

from django.contrib import admin

from taggit.models import Tag, TaggedItem


class TaggedItemInline(admin.StackedInline):
    model = TaggedItem
    extra = 0

class TagAdmin(admin.ModelAdmin):
    inlines = [
        TaggedItemInline
    ]
    ordering = ['name']

admin.site.register(Tag, TagAdmin)

Remove extra inlines from django-taggit
Remove extra inlines from django-taggit
  from django.contrib import admin
  
  from taggit.models import Tag, TaggedItem
  
  
  class TaggedItemInline(admin.StackedInline):
      model = TaggedItem
+     extra = 0
  
  class TagAdmin(admin.ModelAdmin):
      inlines = [
          TaggedItemInline
      ]
      ordering = ['name']
  
  admin.site.register(Tag, TagAdmin)
  
Remove extra inlines from django-taggit
## Code Before:
from django.contrib import admin

from taggit.models import Tag, TaggedItem


class TaggedItemInline(admin.StackedInline):
    model = TaggedItem

class TagAdmin(admin.ModelAdmin):
    inlines = [
        TaggedItemInline
    ]
    ordering = ['name']

admin.site.register(Tag, TagAdmin)

## Instruction:
Remove extra inlines from django-taggit
## Code After:
from django.contrib import admin

from taggit.models import Tag, TaggedItem


class TaggedItemInline(admin.StackedInline):
    model = TaggedItem
    extra = 0

class TagAdmin(admin.ModelAdmin):
    inlines = [
        TaggedItemInline
    ]
    ordering = ['name']

admin.site.register(Tag, TagAdmin)
