Django (part4), djangopart4

Source: Internet
Author: User

Django (part4), djangopart4

 


How does Django handle language preferences (set Chinese based on this)

Behind these features, Django has a flexible model to determine the language used when installing and using applications.
To set a language preference for the installation phase, set LANGUAGE_CODE. If another translator does not find a translation, Django will use
This language serves as the default translation final attempt.
If you only want to run Django in the local language and the language file exists, simply set the LANGUAGE_CODE.
To allow each user to specify their preferred language, use LocaleMiddleware. LocaleMiddleware enables Django-based
To customize the content for each user. It customizes content for each user.
To use LocaleMiddleware, you must add
'Django. middleware. locale. LocaleMiddleware '. The order of middleware has an impact. It is best to follow the following requirements:
Make sure it is the first batch of installed middleware class.
Because LocalMiddleware uses session data, it must be placed after SessionMiddleware.

What does django mean?

There are four meanings! The meaning of words in English should be combined with statements and articles, because each word has multiple meanings. Which one do you want. jiangge shouxi is a Japanese hot pot, while jiangge (django) is the hero of the famous Western Part django. Why did you choose "jiangge" as the title? 2. design that brings clean results django brings clean and effective design... django strictly maintains the clean design, and all its code allows your developed Web programs to follow the best practices 3. remove your program flaws with all these features... django has all these features... django is written in Python. Python is an elegant, concise, and advanced programming language. quick django development... django's philosophy is to do everything possible to speed up development.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.