Ok so here is my (seemingly unique) problem:
I am trying to get a single slug table working for Django. After countless hours of researching I found out this was not a common problem as I tought. Note: I am relativly new to Django.
The real problem I'm trying to solve
I want a nested slug based url without prefixes, like so:
www.example.com/category-name/product-name
but also:
www.example.com/category-name/brand-name
and so on...
There should be the possibility for a slug history so old slugs kan be redirected.
What I have come up with so far:
I found a Rails gem that does mostly what I want: Friendly_Id
Obviously I am making some basic design mistakes. Can someone point me in the right direction?
Ok, so this question turned out to be more difficult and unique than I tought. For future reference, this is how I eventually solved the problem:
test.com/category-slug/product-slug
to test.com/category/6/product/12
, using the generic relation.Note: This approach requires all slugs the be unique globally, so all the segments of the url are unique, which is a bit of a pain, but is doable.