Skip to content

Instantly share code, notes, and snippets.

@MeirKriheli
Created September 3, 2012 08:13
Show Gist options
  • Save MeirKriheli/3607820 to your computer and use it in GitHub Desktop.
Save MeirKriheli/3607820 to your computer and use it in GitHub Desktop.
Taggit problem with override
class I18NTag(TagBase):
"""Extend Taggit's Tag:
* Add a language field
* slug unique with language field
"""
language = models.CharField(max_length=5, choices=settings.LANGUAGES,
blank=True, default=settings.LANGUAGE_CODE)
slug = models.SlugField(unique=False, max_length=100)
class Meta:
unique_together = ('language', 'slug')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment