thoas/django-sluggable — pull request #1 by dracos (2014-04-10 13:59:06+00:00)
Title: Add unique_with argument to sluggable field

This pull request takes some more code from https://pypi.python.org/pypi/django-autoslug to implement the unique_with argument, allowing slugs to be unique only within the other fields specified. For example, slug = SluggableField(unique_with=('category',)) would allow slugs to be the same in different categories, but unique within one category.

In order for this to work, it switches from a decider argument to a slugs generic relation, I don't think that has any side effects, but could be wrong.

It also (unlike django-autoslug) still requires uniqueness lookups when a uniqueness field is empty. This is because you may well have a uniqueness tuple in which one is empty but still require uniqueness (e.g. section slugs in a hierarchy with uniqueness on parent).