Created
September 3, 2012 08:13
-
-
Save MeirKriheli/3607820 to your computer and use it in GitHub Desktop.
Taggit problem with override
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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