| Age | Commit message (Collapse) | Author |
|
This change implements DEP 16: to rename the django-admin command to django.
django-admin is kept as an alias.
Docs references to the "django-admin" command are updated to "django" or
“The django command”.
Renamed the `django-admin` Sphinx directive to `cmd`, and the
`django-admin-option` directive to `cli-option`.
Thanks Johannes Maron, Mike Edmunds, and Jacob Walls for reviews.
|
|
values.
|
|
functools.cached_property.
Since Python 3.12, `functools.cached_property` no longer takes a lock
(https://github.com/python/cpython/issues/87634), which was the main
objection to using it instead of Django's own implementation.
`Prefetch(to_attr=...)` and the admindocs model detail page now accept
`functools.cached_property` as well as Django's own `cached_property`.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
|
|
|
|
The currentmodule directive used django.db.backends.base.DatabaseWrapper,
which is not a real module path. Documented the method on the public
django.db.connection object instead, consistent with the cache docs.
Also indented the method description so it renders as the method body.
Thanks Tim Graham for the review and Tim Schilling for the ticket.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Tutorial 2 interrupted the makemigrations/migrate narrative with a long
sqlmigrate digression and a list of schema conventions. The command, its
example output, and those notes now live where readers look for them:
* docs/topics/migrations.txt gained an "Executing sqlmigrate" section,
with the books models the example SQL is generated from.
* docs/topics/db/models.txt absorbed the notes on table naming and on
Django tailoring SQL to the database backend.
* Tutorial 2 now links to the migrations topic for the details.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Updated references to RemovedInDjango70Warning to use the new warning,
and adjusted references to "Django 7.0" to "Django 2028".
RemovedInDjango70Warning remains importable as an alias of the same
class, so existing warning filters and except clauses in third-party
code keep working across the rename.
|
|
This aims for consistency in the django.db.models namespace.
Thanks Natalia Bidart and Simon Charette for the idea.
|
|
Thanks to these people for pointing these out:
* Hojeong Park
* Natalia Bidart
* Sulav Raj Bista
|
|
|
|
Obsolete since 330638b89f14e1fb06e9d313ccc9768ae167c53f.
|
|
|
|
This makes the name consistent with the `savepoint_commit` and
`savepoint_rollback` functions. The previous name is maintained as a
deprecated alias.
This also frees up the `savepoint` name, which would allow the context
manager from `django-subatomic` to be included in Django.
Co-authored-by: Lily <code@lilyf.org>
|
|
|
|
Thanks James Bligh for the review.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
Co-authored-by: Clifford Gama <cliffygamy@gmail.com>
|
|
https://github.com/psf/black/releases/tag/26.1.0
|
|
|
|
docs/ref/models/querysets.txt.
|
|
Oracle 21c+.
|
|
sticky.
|
|
|
|
Key and index lookups are exempt from the deprecation.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
Thanks Jacob Walls for the review.
|
|
Python objects.
Thanks Bruno Alla, Sarah Boyce, and Jacob Walls for reviews.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
|
|
docs/topics/db/optimization.txt.
|
|
This change ensures that behavior and performance remain consistent when
traversing relationships.
|
|
May your database queries be much reduced with minimal effort.
co-authored-by: Andreas Pelme <andreas@pelme.se>
co-authored-by: Simon Charette <charette.s@gmail.com>
co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
This change aims to make this section clearer and ready to add a description of
fetch modes.
|
|
Signed-off-by: SaJH <wogur981208@gmail.com>
|
|
Lines in the docs files were manually adjusted to conform to the
79 columns limit per line (plus newline), improving readability and
consistency across the content.
|
|
|
|
docs.
|
|
|
|
Postgresql 16+.
Thanks Simon Charette for the guidance and review. Thanks Tim Schilling for the
documentation review. Thanks David Wobrock for investigation and solution proposals.
|
|
Previously save() would crash with an attempted forced update message, and both
save(force_insert=True) and bulk_create() would crash with DoesNotExist errors
trying to retrieve rows with an empty primary key (id IS NULL).
Implementing deferred field model instance copying might be doable in certain
cases (e.g. when all the deferred fields are db generated) but that's not
trivial to implement in a backward compatible way.
Thanks Adam Sołtysik for the report and test and Clifford for the review.
|
|
|
|
model of a self-referential m2m.
Thanks Giannis Terzopoulos and Sarah Boyce for the reviews.
|
|
|
|
|
|
lookups with nested arrays to docs.
|
|
|
|
|
|
models.
|
|
BigAutoField is the default type for primary keys. In models.txt, the linked
anchor shows that the default primary key is a BigAutoField, so it now defers
to that section instead of duplicating an (incorrect) type.
|
|
|
|
inline doc examples.
|
|
This added a missing db_default reference in docs/topics/db/models.txt,
and added a reference to the DatabaseDefault object.
|