Aymeric Augustin
31e16c1343
Negligible style fix.
2013-09-07 13:48:37 -05:00
Chris Wilson
eade315da1
Fixed #10164 -- Made AutoField increase monotonically on SQLite
...
Thanks malte for the report.
2013-09-06 12:31:17 -04:00
Carl Meyer
7211741fc5
Fixed #20999 - Allow overriding formfield class with choices, without subclass restrictions.
...
Refs #18162 . Thanks claudep and mjtamlyn for review.
2013-08-30 17:43:10 -06:00
Tim Graham
c7d0ff0cad
Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
...
Thanks jeroen.pulles at redslider.net for the suggestion and
helper script.
2013-08-29 12:11:03 -04:00
Tim Graham
f19a3669b8
Fixed #14786 -- Fixed get_db_prep_lookup calling get_prep_value twice if prepared is False.
...
Thanks homm for the report and Aramgutang and lrekucki for work on
the patch.
2013-08-29 11:13:34 -04:00
Anssi Kääriäinen
244e2b71f5
Fixed #20946 -- model inheritance + m2m failure
...
Cleaned up the internal implementation of m2m fields by removing
related.py _get_fk_val(). The _get_fk_val() was doing the wrong thing
if asked for the foreign key value on foreign key to parent model's
primary key when child model had different primary key field.
2013-08-21 22:32:04 +01:00
Anssi Kääriäinen
f5552571dc
Fixed #20820 -- Model inheritance + m2m fixture loading regression
...
Tests by Tim Graham, report from jeroen.pulles@redslider.net .
2013-08-21 22:31:50 +01: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
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
Tai Lee
31e6d58d46
Fixed #20348 -- Consistently handle Promise objects in model fields.
...
All Promise objects were passed to force_text() deep in ORM query code.
Not only does this make it difficult or impossible for developers to
prevent or alter this behaviour, but it is also wrong for non-text
fields.
This commit changes `Field.get_prep_value()` from a no-op to one that
resolved Promise objects. All subclasses now call super() method first
to ensure that they have a real value to work with.
2013-07-31 15:54:17 +03:00
Julien Phalip
47c755327b
Fixed a number of minor misspellings.
2013-07-27 18:46:03 -07:00
Anssi Kääriäinen
7cca8d56d2
Fixed related model lookup regression
...
It has been possible to use models of wrong type in related field
lookups. For example pigs__in=[a_duck] has worked. Changes to
ForeignObject broke that.
It might be a good idea to restrict the model types usable in lookups.
This should be done intentionally, not accidentally and without any
consideration for deprecation path.
2013-07-26 13:13:27 +03:00
ersran9
311c1d2848
Fixed #20761 -- Reworded ForeignKey default error message
2013-07-23 22:16:31 +02:00
Anssi Kääriäinen
6b4967e883
Minor change to get_extra_descriptor_filter()
...
Refs #20611 .
2013-07-23 15:34:29 +03:00
Andrew Godwin
03ec3219a0
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/mysql/introspection.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/creation.py
django/db/models/base.py
django/db/models/loading.py
2013-07-22 19:04:25 +01:00
Tim Graham
2456ffa42c
Fixed #20746 -- Removed Python 2.6 specific code/docs
2013-07-14 13:02:55 -04:00
Tim Graham
f2cb94f1c0
Fixed #20740 -- GenericIPAddressField should pass protocol to formfield()
...
Thanks Jeff250.
2013-07-12 16:05:14 -04:00
Alex Gaynor
03d9566e0d
A large number of stylistic cleanups across django/db/
2013-07-08 10:39:54 +10:00
Andrew Godwin
b1e0ec06f0
Merge branch 'master' into schema-alteration
2013-07-02 10:49:53 +01:00
Aymeric Augustin
d5589b4cd3
Removed some conditional code only needed under Python 2.6.
2013-07-01 12:02:17 +02:00
Alex Gaynor
b9ebca6a28
Removed a comment that wasn't adding a value.
...
In the intervening years, RelatedField has become less of a hack (though it still is one). Anyone who wants to can re-instate the comment, but please add more details.
2013-06-30 23:32:23 -07:00
Aymeric Augustin
acd7b34aaf
Advanced deprecation warnings for Django 1.7.
2013-06-29 18:49:37 +02:00
Claude Paroz
ea3fe78a9d
Fixed #20660 -- Do not try to delete an unset FieldFile
...
Thanks stanislas.guerra at gmail.com for the report and
Baptiste Mispelon for the review.
2013-06-29 18:08:39 +02:00
Andrew Godwin
904b82759c
Fix Python 3 support
2013-06-28 17:53:49 +01:00
Andrew Godwin
7a47ba6f6a
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/models/fields/related.py
tests/field_deconstruction/tests.py
2013-06-28 17:32:57 +01:00
Andrew Godwin
48dd1e63bb
Ported over Field.deconstruct() from my schema alteration branch.
...
This is to help other ongoing branches which would benefit from
this functionality.
2013-06-28 17:27:52 +01:00
Andrew Godwin
99b467f272
Add related_query_name to ForeignKey/M2M. Refs #20244
2013-06-27 14:44:21 +01:00
Andrew Godwin
48493cff73
Remove EmailField max_length default removal in deconstruct()
2013-06-22 12:56:37 +01:00
Andrew Godwin
9daf81b94e
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/loading.py
2013-06-19 12:05:23 +01:00
Loic Bistuer
ee77d4b253
Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields
2013-06-18 08:01:17 -04:00
Loic Bistuer
f34cfec0fa
Refactored ValidationError to allow persisting error params and error codes as the exception bubbles up
2013-06-18 08:01:17 -04:00
Baptiste Mispelon
dc9c359546
Fixed #20594 -- Add validation to models.SlugField.
...
Thanks carbonXT for the report.
2013-06-13 13:31:57 -04:00
Andrew Godwin
3c296382b8
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/fields/related.py
2013-06-07 11:15:34 +01:00
Dan Loewenherz
07a73a2714
Fixed #20337 -- Clarified error message when database relation is not allowed.
2013-06-01 07:55:49 -04:00
Tim Graham
6f8627dd7f
Fixed #17582 - Added message to DoesNotExist exceptions.
...
Thanks simon@ for the suggestion and JordanPowell
for the initial patch.
2013-05-27 07:57:06 -04:00
Ramiro Morales
4ba1c2e785
Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField fields.
...
This is backward incompatible for custom form field/widgets that rely
on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select
more than one.' sentence.
Application that use standard model form fields and widgets aren't
affected but need to start handling these help texts by themselves
before Django 1.8.
For more details, see the related release notes and deprecation timeline
sections added with this commit.
2013-05-20 16:29:51 -03:00
Anssi Kääriäinen
c9a96075fa
Fixed #20378 -- regression in GenericRelation on abstract model
...
When a GenericRelation was defined on abstract model, queries on childs
of the abstract model didn't work. The problem was in the way fields and
in particular field.rel was copied from models to their children.
The regression was likely caused by #19385 . Thanks to Gavin Wahl for
spotting the regression.
2013-05-20 18:02:10 +03:00
Andrew Godwin
028bbd15ca
Add a deconstruct() method to Fields.
...
This allows the field's initial argument to be obtained so it can be
serialised to, and re-created from, a textual format.
2013-05-18 13:48:57 +02:00
Andrew Godwin
b31eea069c
Merge branch 'master' into schema-alteration
2013-05-18 10:21:31 +02:00
Aymeric Augustin
9c487b5974
Replaced an antiquated pattern.
...
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Andrew Godwin
cb4b0de49e
Merge branch 'master' into schema-alteration
2013-05-10 12:55:30 +01:00
Andrew Godwin
75bf394d86
Rest of the _meta.app_cache stuff. Schema tests work now.
2013-05-09 15:59:26 +01:00
Andrew Godwin
941d23e548
Whoops. Need to be good and use six.
2013-05-09 14:13:15 +01:00
Andrew Godwin
ade34c44da
Improve error message for bad FK resolution
2013-05-09 14:04:07 +01:00
Mike Fogel
a22e15effc
Remove unnecessary check on __set__ parameters.
2013-05-07 21:50:59 -07:00
Andrew Godwin
7f3678dc4c
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/backends/mysql/base.py
django/db/backends/oracle/base.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/base.py
django/db/backends/sqlite3/base.py
django/db/models/fields/related.py
2013-04-18 17:16:39 +01:00
Simon Charette
216580e034
Fixed #20207 -- Handle ManyToManyField with a unicode name correctly.
2013-04-05 15:09:53 -04:00
Simon Charette
8d05e6c0c7
Fixed deprecation warnings introduced by 97774429ae
.
2013-04-01 17:32:09 -04:00
Anssi Kääriäinen
0e0eb8a955
Fixed field.rel.field_name handling
...
This is a regression fix to multicolumn joins. Refs #19385 .
2013-03-24 20:59:56 +02:00
Anssi Kääriäinen
9572a3992b
Python 2.6 compatibility for #19385
2013-03-24 19:00:24 +02:00