| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
|
|
|
|
| |
natural keys.
|
| |
|
| |
|
|
|
|
| |
Dicts preserve order since Python 3.6.
|
|
|
|
| |
fixtures.
|
|
|
| |
In preparation for handling forward references (refs #26291).
|
| |
|
|
|
|
| |
Python 2
|
| |
|
| |
|
|
|
|
| |
Thanks Tim Graham for the review.
|
|
|
|
| |
Thanks Tim Graham and Simon Charette for the reviews.
|
| |
|
|
|
|
| |
deferred instance loading.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
|
| |
|
| |
|
|
|
|
| |
Thanks to gfairchild for the report and Claude for the review.
|
|
|
|
|
|
|
|
| |
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
|
|
|
|
|
| |
This fixes serialization of a ForeignKey to a UUIDField as the
test indicates.
|
| |
|
|
|
|
|
| |
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
|
|
|
|
|
| |
Thanks Philip Mountifield for the report and excellent analysis, and
Simon Charette for the review.
|
|
|
|
| |
refs #23395.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Since it triggers imports, it shouldn't be done lightly.
This commit adds a public API for doing it explicitly, django.setup(),
and does it automatically when using manage.py and wsgi.py.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Returning None on errors required unpythonic error checking and was
inconsistent with get_app_config.
get_model was a private API until the previous commit, but given that it
was certainly used in third party software, the change is explained in
the release notes.
Applied the same change to get_registered_model, which is a new private
API introduced during the recent refactoring.
|
|
|
|
|
|
| |
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
|
|
|
|
| |
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
|
|
|
|
|
|
|
|
|
|
| |
It was called _populate() before I renamed it to populate(). Since it
has been superseded by populate_models() there's no reason to keep it.
Removed the can_postpone argument of load_app() as it was only used by
populate(). It's a private API and there's no replacement. Simplified
load_app() accordingly. Then new version behaves exactly like the old
one even though it's much shorter.
|
| |
|
|
|
|
|
|
| |
Several parts of Django call get_apps() with a comment along this lines
of "this has the side effect of calling _populate()". I fail to see how
this is better than just calling populate()!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.
They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.
This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added ``--natural-foreign`` and ``--natural-primary`` options and
deprecated the ``--natural`` option to the ``dumpdata`` management
command.
Added ``use_natural_foreign_keys`` and ``use_natural_primary_keys``
arguments and deprecated the ``use_natural_keys`` argument to
``django.core.serializers.Serializer.serialize()``.
Thanks SmileyChris for the suggestion.
|
| |
|
| |
|
|
|
| |
Thanks to Roman Gladkov for the initial patch and Simon Charette for review.
|
|
|
|
|
|
| |
In Python 3, the str type has an __iter__ attribute. Therefore, the
presence of an __iter__ attribute is not sufficient to distinguish
'standard' iterables (list, tuple) from strings.
|
|
|
|
|
|
|
|
|
|
|
| |
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
|
| |
|
|
|
|
|
| |
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
|
|
|
|
|
|
| |
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
|