3

I've set up django-taggit and it's working fine, all tags are listed under tags in admin.

However, I now want to separate my tags into 2 groups, english tags, and spanish tags.

This is what I have, from the documentation here:

class EnTagged(TagBase):

    class Meta:
        verbose_name = "English Tag"
        verbose_name_plural = "English Tags"

class EnglishTags(GenericTaggedItemBase):
    tag = models.ForeignKey(EnTagged)

class Blog(models.Model):
    en_tags = TaggableManager(blank=True, through=EnglishTags) 

(Edit) now tagging works fine, but in temrs of the tags being in the right db tables, but I don't see my custom tags in the admin - how do i show my custom tags in the admin?

Where am I going wrong?

rix
  • 10,104
  • 14
  • 65
  • 92
  • I know this post is ancient history now, but if I wanted to add a text field for a description, would it go in `EnTagged` or `EnglishTags`? – Andy Clifton May 14 '20 at 09:07

1 Answers1

2

Create a admin.py file and put it inside your app and add following lines in it:

from django.contrib import admin

from .models import EnTagged

admin.site.register(EnTagged)
Aamir Rind
  • 38,793
  • 23
  • 126
  • 164