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.
This allows updating code in both places, if necessary. Getting Django
1.5 support would be painful otherwise. This also removes the circular
dependency of django-oscar-testsupport on Oscar.
The requirements were merged. The imports were updated
accordingly. Unused imports in the touched files were removed. No
further changes.
* Re-skin of the dashboard home page.
* Ensure the graph on the home page dashboard shows only 12 segments on the x-axis and not 24.
* Add auto refresh of 5mins to dashboard index
Fixes 366