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

Teacher ordering is not locale-aware with SQLite #6

Open
wikku opened this issue Sep 29, 2018 · 0 comments
Open

Teacher ordering is not locale-aware with SQLite #6

wikku opened this issue Sep 29, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@wikku
Copy link
Collaborator

wikku commented Sep 29, 2018

Django ORM ordering with the SQLite backend compares bytes and is not locale-aware by default.
A workaround is to sort using locale.strxfrm.

Solutions include

  • installing and using collations in SQLite
  • ordering Teacher objects by their ids (set their ids so we have alphabetical order)
  • a custom model manager
@wikku wikku added the bug Something isn't working label Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant