Django's slugify function works fine for creating valid slugs, but automatically converts all letters to lowercase. Many sites such as Wikipedia preserve case when creating slugs, though URL resolution is case insensitive. We want to do this too. We also want the slug to be editable for a specified time window before being locked.
I know that I can create a custom slugify function to handle this. But given how common this is, I'm wondering if there already exists a library or code snippet that does this, or at least makes this task easier. What is the simplest approach to create slugs with the following characteristics?
- all characters are valid slug characters
- case is preserved
- slug may be changed within a specified time window after creation, then locked thereafter (the idea is that the title may be corrected or changed during the initial 3 hour creation period, so the slug should change to reflect the new title during this gestation period)