Curtis Maloney
07876cf02b
Deprecated SortedDict (replaced with collections.OrderedDict)
...
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
Tim Graham
5df84b268d
Removed unused model option "admin"
2013-08-01 10:27:30 -04:00
Alex Couper
1123f45511
Fixed #20649 -- Allowed blank field display to be defined in the initial list of choices.
2013-07-31 14:12:03 -04:00
Loic Bistuer
acd1d439fd
Fixed #20826 -- Moved Manager.raw() and Manager._insert() to the QuerySet class.
2013-07-31 09:54:00 -04:00
Julien Phalip
47c755327b
Fixed a number of minor misspellings.
2013-07-27 18:46:03 -07:00
Loic Bistuer
31fadc1202
Fixed #20625 -- Chainable Manager/QuerySet methods.
...
Additionally this patch solves the orthogonal problem that specialized
`QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet`
type. This wasn't an issue until now because we didn't officially support
custom `QuerySet` but it became necessary with the introduction of this new
feature.
Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham
for the reviews.
2013-07-26 12:41:27 +03:00
Tim Graham
2333c9662b
Fixed #14007 -- Added model discovery in models module without the need to specify app_label.
...
Thanks mark@ and Aramgutang for work on the patch.
2013-07-16 19:32:30 -04:00
Karol Sikora
6272d2f155
Fixed #20429 -- Added QuerySet.update_or_create
...
Thanks tunixman for the suggestion and Loic Bistuer for the review.
2013-07-12 08:26:35 -04:00
Tim Graham
3cdeb572d7
Fixed #17528 -- Documented that add() and remove() with a many-to-many relationship do not call Model.save()
2013-07-12 06:19:16 -04:00
Christopher Medrela
ac223ff6d1
Fixed #20735 -- clarified ManyToManyField constructor doc
2013-07-12 11:50:08 +02:00
Claude Paroz
7442eb1a24
Fixed #20224 -- Update docs examples which mention __unicode__
...
Thanks Marc Tamlyn and Tim Graham for the review.
2013-07-05 19:27:07 +02:00
Tim Graham
577b0f9189
Fixed #20561 -- Emphasized that QuerySet.distinct([*fields]) is only supported by Postgres.
...
Thanks jtiai for the suggestion.
2013-07-05 07:20:37 -04:00
Tim Graham
428de2e339
Fixed #12579 -- Noted QuerySet.get_or_create() depends on database unique constraints.
...
Thanks timmolendijk, jdunck, vijay_shanker, and loic84.
2013-07-04 07:53:13 -04:00
Ramiro Morales
6ba69c8456
Removed 'depth' .select_related() argument as per deprecation TL.
2013-06-28 21:48:16 -03:00
Andrew Godwin
12cb0df10f
Docs for related_query_name
2013-06-27 15:44:22 +01:00
James Bennett
ba610cb319
Fixed #19881 -- Documented that get_next/previous_by_FOO uses default manager.
2013-06-21 13:14:05 -04:00
Loic Bistuer
ee77d4b253
Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields
2013-06-18 08:01:17 -04:00
Tim Graham
5074c75a37
Fixed #16856 - Added a way to clear select_related.
...
Thanks Carl for the suggestion and David Cramer for the patch.
2013-05-30 11:06:05 -04:00
Tim Graham
d321d1acf0
Fixed #20228 - Documented unique_for_date and exclude behavior.
...
Thanks Deepak Thukral for the patch.
2013-05-28 10:04:07 -04:00
Tim Graham
90af278203
Fixed #16137 - Removed kwargs requirement for QuerySet.get_or_create
...
Thanks wilfred@, poirier, and charettes for work
on the patch.
2013-05-27 10:01:14 -04:00
Baptiste Mispelon
08726cb013
Fix #20505 : Typo in BinaryField documentation.
2013-05-27 11:35:34 +02:00
Selwin Ong
375e275030
Slightly reworded 'last()' docs.
2013-05-21 23:18:35 +07:00
Selwin Ong
ea9a0857d4
Fixed #19326 -- Added first() and last() methods to QuerySet
2013-05-21 18:52:28 +03:00
Pablo Recio
65f9e0affd
Fixes #18896 . Add tests verifying that you can get IntegrityErrors using get_or_create through relations like M2M, and it also adds a note into the documentation warning about it
2013-05-19 14:16:12 +02:00
Marc Tamlyn
33c361ef9d
Merge pull request #1129 from frog32/master
...
Add needed Imports to the Documentation
2013-05-19 01:37:25 -07:00
Marc Egli
e4591debd1
Add missing imports and models to the examples in the the model layer documentation
2013-05-18 18:38:52 +02:00
Donald Stufft
398841d6d3
Merge branch 'allow-any-iterable-for-choices'
2013-05-18 11:31:16 -04:00
Erik Romijn
56e2f6ccae
Fixed #20446 -- Documentation for SmallIntegerField does not clarify 'small'
2013-05-18 17:16:07 +02:00
Donald Stufft
a19e9d80ff
Fixed #20430 - Enable iterable of iterables for model choices
...
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Aymeric Augustin
7b85ef9dfb
Fixed #20408 -- Clarified that values_list() doesn't return a list.
...
Thanks marktranchant, bmispelon, and alextreme.
2013-05-18 12:46:12 +02:00
Tim Graham
8035533557
Merge pull request #1039 from cannona/master
...
Clarified what unique_for_date considers
2013-05-14 16:01:24 -07:00
Wilfred Hughes
d258cce482
Fixing a minor spelling mistake in the queryset documentation
2013-05-14 11:40:33 +01:00
Simeon Visser
b9efc03e6d
Fixed #20397 - Cleaned up issue with quotation marks in documentation
2013-05-12 20:24:48 +01:00
Aymeric Augustin
1fff8daf88
Fixed test failures on MySQL.
...
Some tests failed when the time zone definitions were loaded in MySQL
and pytz wasn't installed. This setup isn't supported.
2013-05-08 13:03:36 +02:00
Aaron Cannon
291250f7b6
Added clarification to the docs, pointing out that unique_for_date only considers the date portion of DateTime fields.
2013-05-03 08:46:53 -05:00
Juan Catalano
78c842a323
Adapted uses of versionchanged/versionadded to the new form.
...
Refs #20104 .
2013-04-20 17:18:35 +02:00
Tim Graham
712a792713
Fixed #20243 - Clarified when RelatedManager.remove() exists.
2013-04-11 14:13:09 -04:00
Andrew Badr
408da7b457
remove confusing phrase from DecimalField docs
...
The phrase "if it exists" was used in reference to the `decimal_places`
argument to `DecimalField`, when in fact that field is required.
2013-04-11 16:27:14 +03:00
Aymeric Augustin
e16c48e001
Fixed #15124 -- Changed the default for BooleanField.
...
Thanks to the many contributors who updated and improved the patch over
the life of this ticket.
2013-03-24 13:47:01 +01:00
Tim Graham
93cffc3b37
Added missing markup to docs.
2013-03-22 13:50:07 -04:00
Aymeric Augustin
6197935152
Fixed #19968 -- Dropped support for PostgreSQL < 8.4.
2013-03-18 21:16:29 +01:00
Johan Charpentier
186bff4703
Fixed #20053 -- Fix `index_together` documentation
2013-03-15 15:15:52 +01:00
Anssi Kääriäinen
6b4834952d
Fixed #16649 -- Refactored save_base logic
...
Model.save() will use UPDATE - if not updated - INSERT instead of
SELECT - if found UPDATE else INSERT. This should save a query when
updating, but will cost a little when inserting model with PK set.
Also fixed #17341 -- made sure .save() commits transactions only after
the whole model has been saved. This wasn't the case in model
inheritance situations.
The save_base implementation was refactored into multiple methods.
A typical chain for inherited save is:
save_base()
_save_parents(self)
for each parent:
_save_parents(parent)
_save_table(parent)
_save_table(self)
2013-03-14 11:01:47 +02:00
Ramiro Morales
7e26f4cb79
Fixed broken link in binary fields doc.
2013-03-11 22:09:21 -03:00
Jonathan Loy
b3c6a20e71
Fixed #20018 : Added backtick to fix reference
...
Fixed #20018
2013-03-10 14:09:33 -04:00
Loic Bistuer
6983a1a540
Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that return a QuerySet.
2013-03-08 10:11:45 -05:00
Alex Gaynor
1b81f328f4
Adde two "versionadded" markers, thanks to mYk for noticing.
2013-03-07 12:05:06 -08:00
Alex Gaynor
bbbd698c7a
Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models.
2013-03-07 11:24:51 -08:00
Claude Paroz
8ee1eddb7e
Add a BinaryField model field
...
Thanks Michael Jung, Charl Botha and Florian Apolloner for review
and help on the patch.
2013-03-02 10:29:02 +01:00
Anssi Kääriäinen
50328f0a61
Fixed #19861 -- Transaction ._dirty flag improvement
...
There were a couple of errors in ._dirty flag handling:
* It started as None, but was never reset to None.
* The _dirty flag was sometimes used to indicate if the connection
was inside transaction management, but this was not done
consistently. This also meant the flag had three separate values.
* The None value had a special meaning, causing for example inability
to commit() on new connection unless enter/leave tx management was
done.
* The _dirty was tracking "connection in transaction" state, but only
in managed transactions.
* Some tests never reset the transaction state of the used connection.
* And some additional less important changes.
This commit has some potential for regressions, but as the above list
shows, the current situation isn't perfect either.
2013-02-27 17:54:27 +02:00