Maik Hoepfel
6577624297
Make category slug creation optional
As category slugs are relevant for SEO, it is often desirable to be able
to change them independently of the name.
Previously, Oscar by default updated the slug on each save().
This commit completely removes the logic to update an existing slug, as
it is an anti-pattern, as it breaks old links to the site.
It also doesn't raise a ValidationError in the save() method any more,
which is an anti pattern as well. Unfortunately, we can't validate
uniqueness in a clean_slug method (where it should live) as we need
treebeard's information about siblings, which is only available after
save.
This commit replaces the previous slug handling by a simpler approach:
if no slug is supplied, we generate one -- otherwise we assume the user
knows what they're doing.