... 更と新機能 The major changes in this release (for developers currently using the 0.91 release) are a result of merging the 'magic-removal' branch of development. This branch removed a number of constraints in the way Django code had to be written that ... pen-source release. It's now possible to write more natural, Pythonic code that works as expected, and there's less "black magic" happening behind the scenes. Aside from that, another main theme of this release is a dramatic increase in usability. We' ... . From Arabic to Chinese to Hungarian to Welsh, it is now possible to use Django's admin site in your native language. The number of changes required to port from 0.91-compatible code to the 0.95 code base are significant in some cases. However, they a ... ... ... ... also contains tags . These are the exact revisions from which packaged Django releases were produced, since version 1.0. A number of tags also exist under the archive/ prefix for archived work . The source code for the Djangoproject.com website can be ... f indicating this. As a workaround, branches of Django which are closed and no longer maintained were moved into attic . A number of tags exist under the archive/ prefix to maintain a reference to this and other work of historical interest. The followi ... go.contrib.gis . i18n : Added internationalization support to Django. This has been part of Django since the 0.90 release. magic-removal : A major refactoring of both the internals and public APIs of Django's object-relational mapper. This has been pa ... ... the timezone migration guide and the timezone FAQ for useful pointers. Other notable new features in Django 1.4 include: A number of ORM improvements, including SELECT FOR UPDATE support , the ability to bulk insert large datasets for improved performa ... CSRF improvements , and simple clickjacking protection . An updated default project layout and manage.py that removes the "magic" from prior versions. And for those who don't like the new layout, you can use custom project and app templates instead! S ... required Python version. Django is tested and supported on Python 2.5, 2.6 and 2.7. This change should affect only a small number of Django users, as most operating-system vendors today are shipping Python 2.5 or newer as their default version. If you' ... ... last to support Python 2.6. Django 1.7 is the first release to support Python 3.4. This change should affect only a small number of Django users, as most operating-system vendors today are shipping Python 2.7 or newer as their default version. If you' ... on to work around this issue by creating a custom QuerySet so that custom methods could be chained; but the solution had a number of drawbacks: The custom QuerySet and its custom methods were lost after the first call to values() or values_list() . Wri ... d be used as a context manager. The specific backend's cursor defined the behavior of the context manager. The behavior of magic method lookups was changed with Python 2.7 and cursors were no longer usable as context managers. Django 1.7 allows a curs ... ... r these issues before code review it allows the reviewer to focus on the change itself, and it can also help to reduce the number of CI runs. To use the tool, first install pre-commit and then the git hooks: / $ python -m pip install pre-commit $ p ... ssues where the ticket has additional details that can't be easily described in docstrings or comments. Include the ticket number at the end of a sentence like this: def test_foo (): """ A test docstring looks like this (#123456). """ ... Where applica ... that these are not all required): All database fields Custom manager attributes class Meta def __str__() and other Python magic methods def save() def get_absolute_url() Any custom methods If choices is defined for a given model field, define each ch ... ... s and filter fields based on their attributes . The Model._meta object has been part of Django since the days of pre-0.96 "Magic Removal" -- it just wasn't an official, stable API. In recognition of this, we've endeavored to maintain backwards-compati ... . The count argument was added to assertTemplateUsed() . This allows you to assert that a template was rendered a specific number of times. The new assertJSONNotEqual() assertion allows you to test that two JSON fragments are not equal. Added options t ... mplate.defaultfilters have been changed to automatically escape their input value: join linebreaksbr linebreaks_filter linenumbers unordered_list urlize urlizetrunc You can revert to the old behavior by specifying autoescape=False if you are passing tr ... 2026年10月08日