Andrew Godwin
c8cbdabfab
Fix Python 3 support
2013-07-26 17:08:12 +01:00
Andrew Godwin
52643a69e3
Add --fake option to migrate
2013-07-26 16:47:00 +01:00
Andrew Godwin
3f7113f1d9
Fix timezone warnings if USE_TZ=True
2013-07-26 16:46:48 +01:00
Andrew Godwin
9c6d57ef5a
Prettier imports
2013-07-26 16:40:27 +01:00
Andrew Godwin
a758c9c186
Add test for creating M2Ms
2013-07-25 16:36:58 +01:00
Andrew Godwin
162f7b938f
Make migrate command recognise prefixes and 'zero'.
2013-07-22 19:43:58 +01: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
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
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
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
95eb68c98f
Fixed #17339 -- Factor out has_result into database backend.
...
Thanks jonash.
2013-07-09 06:41:52 -04:00
Shai Berger
c0a4894dca
Fixed last_executed_query test failure on Oracle
2013-07-08 23:47:02 +03:00
Tim Graham
da79ccca1d
Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows.
...
Thanks Patryk Zawadzki.
2013-07-08 08:33:40 -04:00
Alex Gaynor
43073dbd76
fixed a mis-importt in mysql/base.py
2013-07-08 11:18:06 +10:00
Alex Gaynor
03d9566e0d
A large number of stylistic cleanups across django/db/
2013-07-08 10:39:54 +10:00
Alex Gaynor
0b69a75502
Fixed a bug I introduced in my previosu ommit.
2013-07-08 10:32:04 +10:00
Alex Gaynor
626fa28878
Fixed #13813 -- Comparison of DatabaseWrappers doesn't raise errors.
...
Patch from Lukasz Balcerzak.
2013-07-08 09:35:08 +10:00
Alex Gaynor
c8c22ccdcb
Removed some logic that wasn't needed following removal of some deprecated code.
2013-07-08 08:49:58 +10:00
Andrew Godwin
3a6580e485
Make get_constraints return columns in order
2013-07-02 18:02:20 +01:00
Andrew Godwin
61ff46cf8b
Add AlterIndexTogether operation
2013-07-02 18:02:01 +01:00
Andrew Godwin
dbd3e775c1
Fix get_constraints to do multi-column indexes properly on pg
2013-07-02 12:06:00 +01:00
Andrew Godwin
f343cbf06c
Fix combined alters on PostgreSQL
2013-07-02 11:51:18 +01:00
Andrew Godwin
6a8cfbf07b
Support for index_together in schema backends
2013-07-02 11:43:44 +01:00
Andrew Godwin
3b20af3e96
Autodetection of unique_together changes
2013-07-02 11:25:18 +01:00
Andrew Godwin
67dcea711e
Add unique_together altering operation
2013-07-02 11:19:02 +01: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
dd9c6bc359
Introduced getters for connection.autocommit and .needs_rollback.
...
They ensure that the attributes aren't accessed in conditions where they
don't contain a valid value.
Fixed #20666 .
2013-06-30 15:57:00 +02:00
Aymeric Augustin
acd7b34aaf
Advanced deprecation warnings for Django 1.7.
2013-06-29 18:49:37 +02:00
Claude Paroz
59b0c48ce2
Fixed #18592 -- Prevented crash when accessing MySQL _last_executed
...
Thanks reames at asymmetricventures.com for the report.
2013-06-29 18:44:41 +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
Ramiro Morales
6ba69c8456
Removed 'depth' .select_related() argument as per deprecation TL.
2013-06-28 21:48:16 -03: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
Shai Berger
d097417025
Support 'pyformat' style parameters in raw queries, Refs #10070
...
Add support for Oracle, fix an issue with the repr of RawQuerySet,
add tests and documentations. Also added a 'supports_paramstyle_pyformat'
database feature, True by default, False for SQLite.
Thanks Donald Stufft for review of documentation.
2013-06-28 06:59:10 +03:00
Aymeric Augustin
c1284c3d3c
Fixed #20571 -- Added an API to control connection.needs_rollback.
...
This is useful:
- to force a rollback on the exit of an atomic block without having to
raise and catch an exception;
- to prevent a rollback after handling an exception manually.
2013-06-27 22:19:54 +02:00
Andrew Godwin
99b467f272
Add related_query_name to ForeignKey/M2M. Refs #20244
2013-06-27 14:44:21 +01:00
Loic Bistuer
a9ea7d8c70
Fixed #20462 - Replaced the str() cast introduced in 273dc55
by force_text()
2013-06-26 21:30:58 +07:00
Andrew Clark
273dc550a4
Fixed #20462 -- null/non-string regex lookups are now consistent
...
Thanks to noirbizarre for the report and initial patch.
2013-06-26 08:13:26 -04:00
Simon Charette
b91787910c
Fixed #20642 -- Deprecated `Option.get_(add|change|delete)_permission`.
...
Those methods were only used by `contrib.admin` internally and exclusively
related to `contrib.auth`. Since they were undocumented but used
in the wild the raised deprecation warning point to an also undocumented
alternative that lives in `contrib.auth`.
Also did some PEP8 and other cleanups in the affected modules.
2013-06-25 12:22:37 -04:00
Andrew Godwin
e2d7e83256
Autodetect ForeignKeys and add dependencies/split on circulars
2013-06-22 17:15:51 +01:00
Gilberto Gonçalves
680b512fc1
Fixed #20587 -- Made convert_values handle None values
2013-06-22 14:05:12 +01:00
Andrew Godwin
48493cff73
Remove EmailField max_length default removal in deconstruct()
2013-06-22 12:56:37 +01:00
Andrew Godwin
cca40703df
Prompt about renames rather than doing them automatically
2013-06-21 15:32:15 +01:00
Andrew Godwin
92a10f5552
Autodetect field renames. HAHAHA. AHAHAHAHA. YES.
2013-06-20 16:02:43 +01:00
Andrew Godwin
47e4b86ddf
Autodetect field alters
2013-06-20 15:19:30 +01:00
Andrew Godwin
80bdf68d6b
Add AlterField and RenameField operations
2013-06-20 15:12:59 +01:00