Eric Boersma
4d13cc56de
Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
...
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
2013-09-05 20:14:58 -04:00
Tim Graham
a89c856a7a
Fixed typo in docs/ref/models/options.txt
2013-08-30 21:05:36 -04:00
Anssi Kääriäinen
e973ee6a98
Fixed #20988 -- Added model meta option select_on_save
...
The option can be used to force pre 1.6 style SELECT on save behaviour.
This is needed in case the database returns zero updated rows even if
there is a matching row in the DB. One such case is PostgreSQL update
trigger that returns NULL.
Reviewed by Tim Graham.
Refs #16649
2013-08-30 09:41:07 +03:00
Andrew Godwin
5569b0b92f
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/backends/oracle/base.py
django/db/backends/postgresql_psycopg2/base.py
django/db/models/signals.py
tests/queries/tests.py
2013-08-23 12:36:53 +01:00
Anssi Kääriäinen
6af05e7a0f
Fixed model.__eq__ and __hash__ for no pk value cases
...
The __eq__ method now considers two instances without primary key value
equal only when they have same id(). The __hash__ method raises
TypeError for no primary key case.
Fixed #18864 , fixed #18250
Thanks to Tim Graham for docs review.
2013-08-22 17:24:07 +03:00
Kevin Christopher Henry
7775ced938
Documentation - Noted that OneToOneField doesn't respect unique.
...
Added OneToOneField to the list of model fields for which the unique
argument isn't valid. (OneToOneFields are inherently unique, and if
the user supplies a value for unique it is ignored / overwritten.)
2013-08-21 22:32:04 +01:00
Kevin Christopher Henry
bb011cf809
Documentation -- Corrected error about Model.full_clean()
...
Although the ModelForm validation code was changed to call
Model.full_clean(), the documentation still said otherwise. The
offending phrase was removed.
2013-08-21 15:38:07 -04:00
Kevin Christopher Henry
83e434a2c2
Documentation - Noted that OneToOneField doesn't respect unique.
...
Added OneToOneField to the list of model fields for which the unique
argument isn't valid. (OneToOneFields are inherently unique, and if
the user supplies a value for unique it is ignored / overwritten.)
2013-08-20 21:20:29 -07:00
Andrew Godwin
b6a957f0ba
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
docs/ref/django-admin.txt
2013-08-19 18:30:48 +01:00
Tim Graham
7b69c3e775
Removed versionadded/changed annotations for 1.5
2013-08-19 09:09:41 -04:00
Anssi Kääriäinen
3844089edc
Fixed #20777 -- Admin proxy model deletion regression
...
Added proxy_models tests by Harm Geerts <github@geertswei.nl>.
2013-08-19 09:51:41 +03:00
Anssi Kääriäinen
4668c142dc
Made Model.__eq__ consider proxy models equivalent
...
Fixed #11892 , fixed #16458 , fixed #14492 .
2013-08-19 09:51:28 +03:00
Tim Graham
29255fcb4f
Fixed some ReST errors regarding backticks
2013-08-15 07:14:10 -04:00
Andrew Godwin
588b523233
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/options.py
2013-08-09 14:37:37 +01:00
Tim Graham
ddae74b64c
Fixed #9057 -- Added default_permissions model meta option.
...
Thanks hvendelbo for the suggestion and koenb for the draft patch.
2013-08-09 09:19:52 -04:00
Andrew Godwin
de64c4d6e9
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/core/management/commands/flush.py
django/core/management/commands/syncdb.py
django/db/models/loading.py
docs/internals/deprecation.txt
docs/ref/django-admin.txt
docs/releases/1.7.txt
2013-08-09 14:17:30 +01:00
Preston Holmes
cf041b883c
Merge pull request #1453 from chrismedrela/ticket20484-improvement
...
Fixed #20484 again -- added note to field documentation
2013-08-07 14:10:24 -07:00
Christopher Medrela
fb26c4996a
Fixed #20484 again -- added note to field documentation
2013-08-07 20:57:56 +02:00
Dominic Rodger
c33d1ca1d9
Fixed #20852 - Fixed incorrectly generated left quotes in docs.
...
Sphinx generates left single quotes for apostrophes after
code markup, when right single quotes are required. The
easiest way to fix this is just by inserting the unicode
character for a right single quote.
Instances of the problem were found by looking for
">‘" in the generated HTML.
2013-08-06 07:13:17 -04:00
Jimmy Song
94d7fed775
Fixed #20859 - Clarified Model.clean() example.
2013-08-05 09:06:09 -04:00
Daniele Procida
e8183a8193
Fixed #20842 and #20845 - Added a note on order_by() and improved prefetch_related() docs.
2013-08-04 12:34:28 -04:00
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
Andrew Godwin
f8297f6323
More migration docs, and conversion of all easy syncdb references
2013-07-25 16:19:36 +01: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