| Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
Per deprecation timeline; refs #13252.
|
|
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.
|
|
Thanks Reinout van Rees for the review.
|
|
|
|
|
|
refs #23395.
|
|
|
|
|
|
|
|
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
|
|
|
|
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.
|
|
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
|
|
Thanks joseph at vertstudios.com for the suggestion.
|
|
|
|
|
|
The serializer definitely exists, but the dependent yaml module may not
be installed. The register_serializer() function will catch exceptions
and will stub in a fake serializer object that will raise the exception
when the serializer is used.
|
|
|
|
Thanks Stéphane Raimbault for the report and the initial patch.
|
|
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
|
|
This was a shim for pre-Python 2.7 support.
|
|
|
|
Thanks brandon@ and Anssi for the report.
|
|
|
|
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
|
|
return a QuerySet.
|
|
Fixed #19746 -- Allow deserialization of pk-less data
|
|
attacks.
This is a security fix. Disclosure and advisory coming shortly.
|
|
|
|
|
|
Thanks Beuc for the report and the initial patch.
|