Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
how does django sort the models in django admin in chinese?

Django version: 1.10.7

I have an django app built for chinese end users.

In django admin, the models are ordered by alphabetically for English. When I switch to Chinese, the models are re-ordered.

I want to know how they are ordered and determined by which part of the Django software.

I know the line is : https://github.com/django/django/blob/1.10.7/django/contrib/admin/sites.py#L458

I still don't understand how the sorting is done for Chinese

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you're storing verbose_name_plural in UTF-8, then the modal would be sorted in UTF-8 encoding. It depends on the string encoding. Like:

>>> a=[u'甲-1', u'乙-2', u'丙-3']
>>> a.sort()
>>> a
[u'\u4e19-3', u'\u4e59-2', u'\u7532-1']
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!