1
0
mirror of https://github.com/django/django.git synced 2025-05-01 04:34:40 +00:00

44 Commits

Author SHA1 Message Date
Berker Peksag
d73c7e5db6 [1.7.x] Limited lines to 119 characters in django/{contrib,db}.
Refs #23395.

Backport of c9178ef17a (to decrease chance of backport conflicts) from master
2014-10-29 08:01:35 -04:00
Rudy Mutter
e31be40f16 [1.7.x] Fixed #23365 -- Added support for timezone-aware datetimes to migrations.
Backport of a407b846b4 from master
2014-10-09 22:39:17 +07:00
Loic Bistuer
7355885ef5 [1.7.x] Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imports.
Thanks Tim Graham for the review.

Backport of b23d47412c from master
2014-09-27 00:40:35 +07:00
Lee Sanghyuck
6e5e2b0e28 [1.7.x] Fixed #23316 -- Added datetime.time serialization in migrations.
Backport of 11d9cbe2f4 from master
2014-08-19 13:32:05 -04:00
Andrew Godwin
563046a7de [1.7.x] Fixed #22983: Alert when squashing RunPython operations with referred functions. 2014-07-11 19:01:47 -07:00
Simon Charette
2f0cc4f5fb [1.7.x] Fixed #22943 -- Correctly serialize compiled regexes.
Thanks to antialiasis at gmail dot com for the patch.
2014-07-05 16:38:34 -07:00
Colin Wood
f5740af868 [1.7.x] Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error. 2014-07-02 12:44:10 -04:00
Víðir Valberg Guðmundsson
7f0c207d1b [1.7.x] Fixed #22577: Python 3 broke on non-module migrations directory 2014-06-17 09:57:15 -07:00
Matthew Schinckel
2dba6ab767 [1.7.x] Fixed #22788 -- Ensured custom migration operations can be written.
This inspects the migration operation, and if it is not in the
django.db.migrations module, it adds the relevant imports to the
migration writer and uses the correct class name.

Backport of bb39037fcb from master
2014-06-16 12:39:05 -04:00
Tim Graham
83fe38ae30 [1.7.x] Removed usage of deprecated django.utils.importlib.
Backport of 1e84d261d6 from master
2014-06-07 21:11:17 -04:00
Andrew Godwin
98949e3b10 [1.7.x] Fixed #22436: More careful checking on method ref'ce serialization 2014-06-07 17:06:06 -07:00
Moayad Mardini
e4eae5df0e [1.7.x] Fixed #22682 -- makemigrations will create MIGRATION_MODULES package
`makemigrations` will automatically create the package specified
in `MIGRATION_MODULES` if it doesn't already exist.

Thanks ovidiuc4 for the report.
2014-05-29 15:39:02 -07:00
Moayad Mardini
7d4a51e239 [1.7.x] Fixed #22679 -- Fixed empty tuple serialization in MigrationWriter.
Thanks rockallite.wulf for the report.

Backport of ad994a3c5b5911a12a5e2f2a8d06c036be1b8ad8 from master.
2014-05-22 16:20:21 +02:00
Claude Paroz
e8a7436941 [1.7.x] Harmonized some PEP 0263 coding preambles
Backport of e520a73ee from master.
2014-05-15 20:01:31 +02:00
Claude Paroz
0d138b9cf4 [1.7.x] Fixed #22564 -- Prevented unneeded bytestrings in migrations
In some cases, this could lead to migrations written with Python 2
being incompatible with Python 3.
Thanks Tim Graham for the report and Loïc Bistuer for the advices.
Backport of da9cf53cb from master.
2014-05-06 09:14:32 +02:00
Simon Charette
9fb61cb64a [1.7.x] Fixed #22350 -- Consistently serialize bytes and text in migrations.
Thanks to @treyhunner and Loïc for their suggestions and review.

Backport of 72d3889db4 from master
2014-04-13 19:03:20 -04:00
Simon Charette
7b3a221ad6 [1.7.x] Fixed #22363 -- Correctly serialize django.utils.datetime_safe objects.
Thanks to linovia for the report.

Backport of 074d3183d9 from master
2014-04-03 14:56:41 -04:00
Andrew Godwin
97a8fd4682 Fixed #21954: Raise nice error when serializing datetimes with timezones 2014-02-09 11:17:38 +00:00
Marc Tamlyn
aea9faa146 Fix pep8 violation in migration template. 2014-02-05 14:39:44 +00:00
Markus Holtermann
047394f79c Fixed #21852 -- Make migration writer serialize iterators 2014-01-22 09:21:54 +01:00
Andrew Godwin
6bbb820014 Fixed #21290: Documented migration serializing and improved error 2014-01-19 19:27:30 +00:00
Andrew Godwin
3f1a008266 Fixed #21664: Multi-table inheritance was duplicating _ptr fields 2014-01-19 18:35:49 +00:00
Loic Bistuer
374faa4721 Fixed #21323 -- Improved readability of serialized Operation. 2014-01-20 00:16:07 +07:00
Andrew Godwin
c9de1b4a55 Implement swappable model support for migrations 2014-01-19 16:43:12 +00:00
Aymeric Augustin
1716b7ce5a Renamed AppCache to Apps.
Also renamed app_cache to apps and "app cache" to "app registry".

Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin
2fef9e5375 Moved apps back in the toplevel django namespace.
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
4a56a93cc4 Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00
Aymeric Augustin
259cd3cd41 Deprecated get_app_package, get_app_path and get_app_paths. 2013-12-17 10:17:45 +01:00
Aymeric Augustin
8662654d6d Removed module-level functions for the app cache.
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.

They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.

This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
2013-12-17 10:17:44 +01:00
Aymeric Augustin
860c2c8bc5 Moved django.db.models.loading to django.apps.cache.
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-17 10:17:43 +01:00
Loic Bistuer
e565e1332d Fixed #21275 -- Fixed a serializer error when generating migrations for contrib.auth.
The migration serializer now looks for a deconstruct method on any object.
2013-10-21 14:54:52 -04:00
Loic Bistuer
8d6953d55c Added support for serializing class methods. - Refs #21290.
The new handling allows us to do away with the whitelisting that was
required to support date and datetime objects.
2013-10-19 12:10:18 -04:00
Loic Bistuer
584110417f Fixed #21283 -- Added support for migrations if models is a package.
Thanks Markus Holtermann for the report.
2013-10-19 09:48:57 -04:00
Andrew Godwin
763ac8b642 First pass on squashmigrations command; files are right, execution not. 2013-10-16 12:00:07 +01:00
Loic Bistuer
d59f1993f1 Made MigrationWriter look for a "deconstruct" attribute on functions.
Refs #20978.
2013-09-10 10:12:23 -04:00
Loic Bistuer
adc0ab3386 Fixed #21037 -- Made MigrationWriter raise a ValueError when serializing lambda functions. 2013-09-06 20:13:01 -04:00
Loic Bistuer
ff9e116198 Fixed #21008 -- Made MigrationWriter handle Promise objects. 2013-08-31 20:26:44 -04:00
Simon Charette
11cd7388f7 Fixed #20989 -- Removed useless explicit list comprehensions. 2013-08-30 10:57:51 -04:00
Andrew Godwin
9f73629420 utils.importlib is deprecated 2013-08-09 17:36:16 +01:00
Andrew Godwin
c8cbdabfab Fix Python 3 support 2013-07-26 17:08:12 +01:00
Andrew Godwin
f25a385a5e Makemigration command now works 2013-06-19 16:23:52 +01:00
Andrew Godwin
91c470def5 Auto-naming for migrations and some writer fixes 2013-06-07 17:56:43 +01:00
Andrew Godwin
c7aa4b5338 Field encoding 2013-06-07 15:36:31 +01:00
Andrew Godwin
4492f06408 A bit of an autodetector and a bit of a writer 2013-06-07 15:28:38 +01:00