justinmayer / django-autoslug

AutoSlugField for Django. Supports (but not does not require) unidecode/pytils for transliteration. Old issue tracker is at Bitbucket: https://bitbucket.org/neithere/django-autoslug/issues

Home Page:https://readthedocs.org/projects/django-autoslug/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unique_with does not work with BooleanFields

jgadelange opened this issue · comments

I have a model which has a BooleanField that determines on which path a model should be visible:

class ExampleModel(models.Model):
    title = models.CharField(max_length=255)
    is_in_A = models.BooleanField()
    slug = AutoSlugField(unique_with='is_in_A', populate_from='title', always_update=True)

The unique_with in this field does not work when the is_in_A is False.