... , supports filtering of displayed lists of objects by fields on the corresponding models, including across database-level relationships. This is implemented by passing lookup arguments in the querystring portion of the URL, and options on the ModelAdmin ... class allow developers to specify particular fields or relationships which will generate automatic links for filtering. One historically-undocumented and -unofficially-supported feature h ... dmin user's permissions; for example, an attacker with access to the admin and sufficient knowledge of model structure and relations could construct query strings which -- with repeated use of regular-expression lookups supported by the Django database AP ... ... , supports filtering of displayed lists of objects by fields on the corresponding models, including across database-level relationships. This is implemented by passing lookup arguments in the querystring portion of the URL, and options on the ModelAdmin ... class allow developers to specify particular fields or relationships which will generate automatic links for filtering. One historically-undocumented and -unofficially-supported feature h ... dmin user's permissions; for example, an attacker with access to the admin and sufficient knowledge of model structure and relations could construct query strings which -- with repeated use of regular-expression lookups supported by the Django database AP ... ... ch runs Python code on the Java Virtual Machine. Django is now compatible with the forthcoming Jython 2.5 release. Generic relations in forms and admin Classes are now included in django.contrib.contenttypes which can be used to support generic relations ... in both the admin interface and in end-user forms. See the documentation for generic relations for details. INSERT / UPDATE distinction Although Django's default behavior of having a model's save() method automaticall ... ... t updated on save. See the Model.save() documentation for more details. Caching of related model instances When traversing relations, the ORM will avoid re-fetching objects that were previously loaded. For example, with the tutorial's models: >>> first_po ... e third line no longer triggers a new SQL query to fetch first_choice.poll ; it was set by the second line. For one-to-one relationships, both sides can be cached. For many-to-one relationships, only the single side of the relationship can be cached. This ... s are used as boolean AND and OR operators. In a filter() call, when F expressions contained lookups spanning multi-valued relations, they didn't always reuse the same relations as other lookups along the same chain. This was changed, and now F() expressi ... ... ield expressions on MySQL ( #31312 ). Fixed a regression in Django 3.0 that didn't include subqueries spanning multivalued relations in the GROUP BY clause ( #31150 ). ... ... the names of the test modules to runtests.py on the command line. For example, if you'd like to run tests only for generic relations and internationalization, type: / $ ./runtests.py --settings = path.to.settings generic_relations i18n ...\> runtests. ... py --settings=path.to.settings generic_relations i18n How do you find out the names of individual tests? Look in tests/ — each directory name there is the name of a test. ... ... haining with values() and values_list() ( #20625 ). Moved the unsaved model instance assignment data loss check on reverse relations to Model.save() ( #25160 ). Readded inline foreign keys to form instances when validating model formsets ( #25431 ). Allow ... ... tiple ManyToManyField s on different models that have the same field name, point to the same model, and have their reverse relations disabled ( #25545 ). Allowed filtering over a RawSQL annotation ( #25506 ). Made the Concat database function idempotent o ... ... raising UnboundLocalError if get_user_model() raised an error (#21439). Fixed a regression that prevented editable GenericRelation subclasses from working in ModelForms (#21428). Added missing to_python method for ModelMultipleChoiceField which is requir ... ixed a crash in ImageField on some platforms (Homebrew and RHEL6 reported) (#21355). Fixed a regression when using generic relations in ModelAdmin.list_filter (#21431). ... ... as {{ "a..b" }} ( #37257 ). Fixed a regression in Django 6.1 where ModelAdmin.list_display entries that traverse multiple relations using __ could crash or display incorrect values ( #37270 ). Fixed a bug in Django 6.1 where the fields.E323 system check ... . Fixed a regression in Django 6.1 where custom querysets used with Prefetch for forward foreign key or reverse one-to-one relationships were not routed using the parent queryset's database ( #37300 ). Fixed a regression in Django 6.1 where HTML-safe stri ... 2026年10月08日