-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
Adding slug convert option #572
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #572 +/- ##
=====================================
Coverage 94% 94%
=====================================
Files 4 4
Lines 434 434
Branches 77 77
=====================================
Hits 408 408
Misses 16 16
Partials 10 10 Continue to review full report at Codecov.
|
Can you clarify? It should not be. We should add a test to verify the behavior before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please rebase?
+1 for this PR. Without this PR, django-taggit has serious performance issue in any non-English applications. django-taggit/taggit/models.py Lines 61 to 71 in 83fe619
Insert a new non-English tag to existing 10,000 tags, will cost 10,000 query. |
@lucemia thank you for pointing this out, I hadn't quite absorbed this fact when this had come up. To be honest I don't quite know what the value of "ascii-fying" everything for slugs is, it does feel a bit silly. So I think that having this setting, and having it be the new default (rationale: if you're using characters outside of ascii, it's very likely you find that important for your language). |
Of course after thinking about this a bit more I am reminded that slugification exists primarily for URLs and the like. For example if you have a URL scheme like I am going to try and dig up some ideas here for how to handle this. |
Unidecode translates non-English words, I have added an option to use the original language as a slug.
I tried to add a test, but adding non-English characters to the test code seemed to be a problem.