summaryrefslogtreecommitdiff
path: root/docs/ref/models
AgeCommit message (Collapse)Author
2012-09-08Fixed #17156 -- Added documentation examples for exists()Tim Graham
Thanks mrmagooey for the draft patch.
2012-09-08Avoided mixing dates and datetimes in the examples.Aymeric Augustin
Refs #16023.
2012-09-07specify any orderable field can be specified in get_latest_by, closes #18875Dan Loewenherz
2012-09-05Fixed #18904 - Typo in MySQL link; thanks Johie Anderson for the report.Tim Graham
2012-08-30Fixed #18883 -- added a missing self parameter in the docsAlex Gaynor
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-26Fixed typo in model fields reference docs.Ramiro Morales
2012-08-21Fixed #18637 - Updated some documentation for aspects of models that are ↵Tim Graham
ModelForm specific, not admin specific. Thanks Ben Sturmfels for the patch.
2012-08-12Fixed #18306 -- Made deferred models issue update_fields on saveAndrei Antoukh
Deferred models now automatically update only the fields which are loaded from the db (with .only() or .defer()). In addition, any field set manually after the load is updated on save.
2012-08-08Fix #18062: Document best practices for choices in model fields.James Bennett
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* 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.
2012-08-03Fixed #15932 - Documented how to supress multiple reverse relations to the ↵Tim Graham
same model. Thanks Claude Paroz for the patch.
2012-07-24Clarified default name of M2M relationship DB table.Ramiro Morales
2012-07-17Fixed #17788 -- Added batch_size argument to qs.bulk_create()Anssi Kääriäinen
The qs.bulk_create() method did not work with large batches together with SQLite3. This commit adds a way to split the bulk into smaller batches. The default batch size is unlimited except for SQLite3 where the batch size is limited to 999 SQL parameters per batch. Thanks to everybody who participated in the discussions at Trac.
2012-07-07Removed Django 1.0-specific sections.Aymeric Augustin
2012-07-01Fixed #17436 - Added warning about overriding Model.__init__()Tim Graham
Thanks zsiciarz for the draft patch.
2012-06-30Fixed #18145 -- Improved documentation of unique_together type fieldsRaúl Cumplido
2012-06-26Fixed #17485 -- Made defer work with select_relatedAnssi Kääriäinen
This commit tackles a couple of issues. First, in certain cases there were some mixups if field.attname or field.name should be deferred. Field.attname is now always used. Another issue tackled is a case where field is both deferred by .only(), and selected by select_related. This case is now an error. A lot of thanks to koniiiik (Michal Petrucha) for the patch, and to Andrei Antoukh for review.
2012-06-07Removed references to changes made in 1.2.Aymeric Augustin
Thanks Florian Apolloner for the patch.
2012-06-06Replaced documentation snippets using "gender" with less sensitive examples.Jacob Kaplan-Moss
2012-06-06Added alt attribute to img tags in docs.Aymeric Augustin
This is a good practice for accessibility. Thanks Jessica McKellar for the report.
2012-05-12Fixed #4102 -- Allow update of specific fields in model.save()Andrei Antoukh
Added the ability to update only part of the model's fields in model.save() by introducing a new kwarg "update_fields". Thanks to all the numerous reviewers and commenters in the ticket
2012-04-30Replaced print statement by print function (forward compatibility syntax).Claude Paroz
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29Prevent Oracle from changing field.null to TrueAnssi Kääriäinen
Fixed #17957 -- when using Oracle and character fields, the fields were set null = True to ease the handling of empty strings. This caused problems when using multiple databases from different vendors, or when the character field happened to be also a primary key. The handling was changed so that NOT NULL is not emitted on Oracle even if field.null = False, and field.null is not touched otherwise. Thanks to bhuztez for the report, ramiro for triaging & comments, ikelly for the patch and alex for reviewing.
2012-04-22Fixed #5893 -- Added a flag to FilePathField to allow listing folders, in ↵Alex Gaynor
addition to regular files. Thank you to Brian Rosner, for encouraging me to first contribute to Django 4 years ago. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09Fixed #17877 -- Ensured that extra WHERE clauses get correctly ANDed when ↵Julien Phalip
they contain OR operations. Thanks to Marek Brzóska for the report, to eleather for the test case and to Adrien Lemaire for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated URLField.verify_exists.Aymeric Augustin
The deprecation schedule was slightly accelerated because of possible security ramifications. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29Fixed #17870 -- Documented that EmailField default max_length of 75 does not ↵Claude Paroz
comply with RFCs 3696/5321. Thanks Rotund for the report and the patch and Russell Keith-Magee for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17Fixed #17926 -- Removed mention of XMLField in docs (missing deletion from ↵Claude Paroz
r15982). Thanks aburgel for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12Edited some docs and docstrings until [17685]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-11Fixed an inappropriate repetition. Thanks DanGer for the report.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-04Documented a limit of the SQLite backend, in relation with the bulk_create ↵Aymeric Augustin
function. Refs #17788. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-28Fixed #17668 - prefetch_related does not work in in_bulkLuke Plant
Thanks to gurets for the report, and akaariai for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-21Fixed a few typos in the aggregation functions reference.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-03Edited models/options.txt changes from [17314]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-21Fixed #10139 -- Clarified that slicing an evaluated QuerySet returns a list, ↵Aymeric Augustin
not a QuerySet. Thanks ori for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-06Moved misplaced documentation warning note about internal QuerySet query ↵Ramiro Morales
atribute. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-31Fixed #640 - Documented that changing order_with_respect_to requires a ↵Timo Graham
schema change; thanks fcurella and poirier for the draft patches. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-31Fixed #702 - Documented that ManyToMany fields can't be in unique_together; ↵Timo Graham
thanks poirier for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-30Edited doc changes from [17244]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22Added support for modifying the effect of ``DISTINCT`` clauses so theyRamiro Morales
only consider some fields (PostgreSQL only). For this, the ``distinct()`` QuerySet method now accepts an optional list of model fields names and generates ``DISTINCT ON`` clauses on these cases. Thanks Jeffrey Gelens and Anssi Kääriäinen for their work. Fixes #6422. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-20Fixed a typo in the model fields reference.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-24Added warning about the performance of large IN clauses in prefetch_related docsLuke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-21Fixed #17269 -- Corrected the model options doc to indicate that, since 1.4, ↵Julien Phalip
all fields in `Meta.ordering` are honored by the admin. Thanks to sebastian for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-19Fix #15646: Document that a FileField's full path can't be relied upon until ↵Karen Tracey
its model has been saved to the database. Thanks poirier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-12Fix #16570: Restore ability to have decimal fields where max_digits equals ↵Karen Tracey
decimal_places. Thanks dcwatson and kenth. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-30Fixed #17063 -- Fixed visibility of a few version-dependant notes in our ↵Ramiro Morales
documentation. Thanks jifeng.yin AT gmail DOT com for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-14Fixed #12308 -- Added tablespace support to the PostgreSQL backend.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16987 bcc190cf-cafb-0310-a4f2-bffc1f526a37