Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unslug() to UniqueSlugify() to reverse map slugs #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanand0
Copy link

@sanand0 sanand0 commented Sep 5, 2015

Since UniqueSlugify already maintains a set of used uids, it's a small step from there to map these back to the original text used to create them.

For example, if the username John Smith is slugifyed into john-smith and used as the URL fragment example.org/user/john-smith, the handler can go from the slug john-smith back to the original name John Smith easily.

@dimka665 -- I've added test cases for this scenario. The existing tests aren't breaking either. Would you consider this merge request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant