Chris Beaven
40f6ca54f8
Fix autodetector creation of RenameModel migration to capitalize model names
2014-03-11 12:23:45 +13:00
Daniel Pyrathon
819e09b848
Fixed #22210 -- Saving model instances to non-related fields.
...
Previously, saving a model instance to a non-related field (in
particular a FloatField) would silently convert the model to an Integer
(the pk) and save it. This is undesirable behaviour, and likely to cause
confusion so the validatio has been hardened.
Thanks to @PirosB3 for the patch and @jarshwah for the review.
2014-03-10 15:25:18 +00:00
Chris Beaven
7feb70eef3
Fixed #22239 -- Add auto detection of renamed models
2014-03-10 13:55:44 +13:00
Shai Berger
deff74ea0c
Fixed the last fix for database test settings to work with Python3.
2014-03-09 12:27:12 +02:00
Shai Berger
84c137490b
Fixed test breakage following test-settings enhancements
2014-03-09 10:23:47 +02:00
Andrew Godwin
40afdaf08c
Fix weird autodetector error
2014-03-08 18:35:45 -08:00
Shai Berger
41afae4ce9
Reorganized the database test settings
...
Change database test settings from "TEST_"-prefixed entries in the
database settings dictionary to setting in a dictionary that is itself
an entry "TEST" in the database settings.
Refs #21775
Thanks Josh Smeaton for review.
2014-03-09 03:57:18 +02:00
Alex Gaynor
add1584bfa
4 flake8 warning fixes
2014-03-08 16:17:54 -08:00
Andrew Godwin
6b07804474
Fixed #22183 : Through M2Ms now correctly handled
2014-03-08 15:58:04 -08:00
Andrew Godwin
cdf6eba181
Merge pull request #2315 from bendavis78/issues/22073
...
Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
2014-03-08 15:44:45 -08:00
Andrew Godwin
cd7a2a077e
Fixed #22199 : Bad max_length deconstruction for FileField
2014-03-08 13:59:12 -08:00
Andrew Godwin
28779abb75
Fix bad conflict detection during makemigrations
2014-03-08 13:53:20 -08:00
Claude Paroz
210d0489c5
Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
...
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Anssi Kääriäinen
219d928852
Fixed #21863 -- supplemented get_lookup() with get_transform()
...
Also fixed #22124 -- Expanded explanation of exactly what is going on in
as_sql() methods.
2014-03-07 14:52:13 +00:00
Andrew Godwin
1232acb884
Don't allow really long migration names
2014-03-06 13:34:31 -08:00
Andrew Godwin
e46e15e5a1
Fixed #22204 : Bad circular-dep-breaking if more than one per run
2014-03-06 13:22:42 -08:00
Andrew Godwin
8ce3ea687c
Revert "Fixed #22183 : Don't make a table for M2Ms with through="
...
This reverts commit 1562b9896f
.
2014-03-06 11:50:04 -08:00
Andrew Godwin
1562b9896f
Fixed #22183 : Don't make a table for M2Ms with through=
2014-03-06 11:35:58 -08:00
Gabe Jackson
b77f26313c
Fixed #22207 -- Added support for GenericRelation reverse lookups
...
GenericRelation now supports an optional related_query_name argument.
Setting related_query_name adds a relation from the related object back to
the content type for filtering, ordering and other query operations.
Thanks to Loic Bistuer for spotting a couple of important issues in
his review.
2014-03-05 22:37:53 +02:00
Akis Kesoglou
c627da0ccc
Fixed #14549 - Removed restriction of single FKs on intermediary tables
...
Thanks to Loic Bistuer for review. Minor changes to error messages
done by committer.
2014-03-05 22:33:58 +02:00
Chris Wilson
95c74b9d69
Fixed #22206 -- Passed models.TextField.max_length to forms.CharField.maxlength
2014-03-05 20:09:28 +01:00
Alex Gaynor
a248c88372
Fixed three small flake8 violations.
2014-03-04 15:13:15 -08:00
Andrew Godwin
8fcc0140d0
Merge pull request #2396 from loic/ticket21893
...
Fixed #21893 -- ModelState didn't account for MTI parents inherited from abstract models.
2014-03-04 12:33:51 -08:00
Loic Bistuer
6436f1fad9
Fixed #21893 -- ModelState didn't account for MTI parents inherited from abstract models.
2014-03-05 03:25:14 +07:00
Chris Wilson
97a5971324
Fixed typo in internal CharField method
2014-03-04 20:32:54 +01:00
Loic Bistuer
7bbb6958dc
Allowed custom querysets when prefetching single valued relations
...
The original patch for custom prefetches didn't allow usage of custom
queryset for single valued relations (along ForeignKey or OneToOneKey).
Allowing these enables calling performance oriented queryset methods like
select_related or defer/only.
Thanks @akaariai and @timgraham for the reviews. Refs #17001 .
2014-03-03 21:35:19 +02:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Russell Keith-Magee
82ac389486
Edited model and field checks for grammar and consistency.
2014-03-03 18:18:39 +08:00
Russell Keith-Magee
bc4dc6e99c
Edited model check messages for grammar and consistency.
2014-03-03 15:35:42 +08:00
Russell Keith-Magee
f7587b20da
Edited MySQL-specific check messages for grammar and consistency.
2014-03-03 14:31:55 +08:00
Aymeric Augustin
7ba29189fa
Restored aliases for two APIs removed by app-loading.
2014-03-02 14:01:52 +01:00
Anubhav Joshi
bb2ca9fe6c
Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..
...
Thanks EmilStenstrom for the suggestion.
2014-03-01 15:44:42 -05:00
Baptiste Mispelon
c679cb7f60
Fixed #22168 -- Fixed migrations failing on sqlite when column names are SQL keywords
...
Thanks to trac user fallen_flint for the report and initial patch.
2014-03-01 13:45:45 +01:00
Andrew Godwin
cbd04c7c49
Fix keyword agument names in RunPython to be positional
2014-02-28 09:22:48 -08:00
Martin Matusiak
48a8b714d4
Fixed bad grammar in a comment.
2014-02-25 21:02:35 -05:00
Andrew Gorcester
202bf69c2f
Fixed #22095 -- Enabled backward migrations for RunPython operations
...
Added reversible property to RunPython so that migrations will not
refuse to reverse migrations including RunPython operations, so long as
reverse_code is set in the RunPython constructor. Included tests to
check the reversible property on RunPython and the similar RunSQL.
2014-02-23 09:30:02 +01:00
Claude Paroz
45edb9d235
Fixed #22057 -- Ensured reverse_lazy can be used in settings
...
And without causing a circular import. Thanks Akis Kesoglou for
the report.
2014-02-18 10:23:30 +01:00
Ben Davis
df2652c448
Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
2014-02-17 16:51:40 -06:00
Artur Frysiak
faf6a911ad
Fixed #22023 -- Raised an error for values() followed by defer() or only().
...
Previously, doing so resulted in invalid data or crash.
Thanks jtiai for the report and Karol Jochelson,
Jakub Nowak, Loic Bistuer, and Baptiste Mispelon for reviews.
2014-02-17 14:46:13 -05:00
Andrew Godwin
3c547a423f
Merge pull request #2270 from bmispelon/ticket-22030
...
Fixed #22030 -- Don't assume that all fields have a swappable_setting at...
2014-02-17 01:16:49 +00:00
Christopher Medrela
d0133504e5
Fixed #22047 -- detecting related_name clash with inheritance
...
Thanks to mondone for fruitful colaboration.
2014-02-15 17:24:05 +01:00
Albert Wang
8bbdcc76e4
Fixed #19299 -- Fixed Nullification of Foreign Keys To CharFields
...
Thanks tunixman for the report and Baptiste Mispelon and
Shai Berger for reviews.
2014-02-15 09:47:32 -05:00
Rodolfo Carvalho
be6d1f39e8
Fixed typo in docstring.
2014-02-15 13:35:41 +01:00
Anton Baklanov
0bd92d68ad
Fixed #22035 -- reordered migration operations
...
Now AddField actions appear in operations list before AlterUniqueTogether
actions.
Thanks to SmileyChris for the report.
2014-02-14 20:00:39 -05:00
Baptiste Mispelon
6873eeeefb
Fixed #22030 -- Don't assume that all fields have a swappable_setting attribute.
2014-02-13 17:43:21 +01:00
Andrew Godwin
bad9456b9c
Fix my slightly hasty autodetector changes
2014-02-12 17:22:50 +00:00
Andrew Godwin
80bbe2265d
Remove redunant code from RunPython operation
2014-02-12 17:21:25 +00:00
Christopher Adams
eefc88feef
Fixed #2445 -- Allowed limit_choices_to attribute to be a callable.
...
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now
be a callable that returns either a ``Q`` object or a dict.
Thanks michael at actrix.gen.nz for the original suggestion.
2014-02-11 14:05:12 -05:00
Christopher Medrela
ee9fcb1672
Fixed #17673 -- Forbid field shadowing.
...
Thanks Anssi Kääriäinen for the suggestion.
2014-02-10 10:04:19 -05:00
Robert Stapenhurst
12385a5f86
Fixed #21763 -- Added an error msg for missing methods on ManyRelatedManager.
...
Attempting to add() and remove() an object related by a 'through' model
now raises more descriptive AttributeErrors, in line with set and
create().
2014-02-09 16:01:17 -05:00