Andrew Godwin
6ca5367869
[1.7.x] Cleanup failing test w/contenttypes and remove useless graph load
2014-04-30 15:12:18 -07:00
Andrew Godwin
35c2a14a49
[1.7.x] Fixed #22485 : Include all unmigrated apps in project state by default.
2014-04-30 12:26:11 -07:00
Tim Graham
a2cac1b68d
[1.7.x] Removed unused import.
...
Backport of d9c272b22f
from master
2014-04-30 07:27:56 -04:00
Bruno Ribeiro da Silva
72493b1b7c
[1.7.x] Fixed #22511 -- Added args to migrations management commands.
...
Backport of 83413c53d2
from master
2014-04-30 07:20:44 -04:00
Ramiro Morales
62bbfba3aa
[1.7.x] Removed bogus, ineffective 'U' flag from codecs.open() call.
...
2df7238512
from master.
2014-04-29 07:52:43 -03:00
Aymeric Augustin
3bb0f118ca
[1.7.x] Fixed #3214 -- Stopped parsing SQL with regex.
...
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.
Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.
sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.
Many people contributed to both tickets, thank you all, and especially
Claude for the review.
Refs #22401 .
Backport of 8b5b199
from master
2014-04-26 17:46:57 +02:00
Claude Paroz
0424c84d54
[1.7.x] Set compile messages options as class variable
...
Refs #18714 . Same logic as options for makemessages commands.
Backport of 3a435a057
from master.
2014-04-23 15:16:38 +02:00
Aymeric Augustin
62eb79fc4c
[1.7.x] Appeased flake8 2.1.0.
...
Backport of 428c0bbe1b
from master
2014-04-21 07:50:50 -04:00
Alex Gaynor
50dddbdfc7
[1.7.x] Corrected many style guide violations that the newest version of flake8 catches
...
Backport of 778ce245dd
from master
2014-04-21 07:50:43 -04:00
Claude Paroz
13340df769
[1.7.x] Adapted fixture read mode to file type
...
Binary mode added in ed532a6a1e
is not supported by ZipFile.
Refs #22399 .
Backport of 275811a93
from master.
2014-04-18 19:24:39 +02:00
Claude Paroz
8d7023dc71
[1.7.x] Fixed #22399 -- Forced fixture reading in binary mode
...
This might help on systems where default encoding is not UTF-8 (and
on Python 3).
Thanks bacilla for the report.
Backport of ed532a6a1
from master.
2014-04-18 17:56:14 +02:00
Tim Graham
ddd25b280f
[1.7.x] Fixed #22194 -- Added --list-tags option to check command.
...
Thanks Elvard for the patch.
Backport of 395d75ea6b
from master
2014-04-10 09:44:43 -04:00
Tim Graham
7eaf329ad3
[1.7.x] Fixed #22322 -- Fixed incorrect explanation of what managed=False does.
...
refs #14305 .
Thanks Adrian Klaver for the report.
Backport of 9b7ba8af1b
from master
2014-03-25 14:03:02 -04:00
Patrick Michaud
908bdea482
[1.7.x] Fixed #22256 -- Replaced bad fallback for missing PATH
...
Thanks Baptiste Mispelon for the review.
Backport of acee46fc9
from master.
2014-03-22 16:54:02 +01:00
Daniel Hahler
fc167c9b5e
Mentioned that ``dumpdata --natural`` is deprecated.
2014-03-18 07:25:37 -04: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
Claude Paroz
06efeae598
Added --previous flag to msgmerge command used by makemessages
...
Also took the opportunity to slightly refactor gettext options
so as to ease customization by subclassing the command.
Thanks Michal Čihař for the report and initial patch.
2014-03-06 10:20:01 +01: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
Claude Paroz
621c5cf4a5
Fixed #21732 -- Made compilemessages complain about non-writable location
...
Instead of crashing with a CommandError, now a non-writable location
of mo files will only make compilemessages complain and continue.
Thanks Ramiro Morales for the review.
2014-02-18 13:38:06 +01:00
Baptiste Mispelon
2a9ee49f3c
Removed BaseCommand.stdin introduced in 116d39842d
.
...
This option is not actually very useful in the general case
because it doesn't override sys.stdin.
It's still marginally useful for testing some features of
the createsuperuser command so it was moved there.
This commit also makes the detection of a TTY in createsuperuser
a bit more robust, after a suggestion of appolo13.
2014-02-18 11:36:06 +01:00
Baptiste Mispelon
116d39842d
Added the possibility to pass a stdin object to a management command.
...
This makes testing certain features easier.
Thanks to AeroNotix for the original patch.
2014-02-17 04:58:31 +01:00
Andrew Godwin
f0f1ba75b0
Fixed #21856 : Don't crash runserver when DATABASES = {}
2014-02-12 19:09:43 +00:00
Andrew Godwin
7e941ba67c
Reverting unapplied migrations check away from being a system-level check.
...
This reverts commit 0ac13ecceb
.
2014-02-12 18:55:20 +00:00
Andrew Godwin
b333de0f5d
Add --empty option to makemigrations
2014-02-12 17:16:40 +00:00
Eli Bendersky
73f51e4113
Fixed #22025 -- Listing app followed by app.Model in dumpdata command
...
When invoked as follows:
$ python manage.py dumpdata blogapp blogapp.Tag
Django would throw a TypeError. This commit fixes the problem and provides
a test.
2014-02-12 15:34:26 +01:00
Andrew Godwin
d5df7a0515
Fixed #21969 : Fix behaviour of initial_data with migrated apps
2014-02-09 12:22:59 +00:00
Andrew Godwin
2085f53f56
Fixed #21968 : Bad detection of old-style apps to add initial migration
2014-02-09 11:42:10 +00:00
mlavin
0ac13ecceb
Remove check_migrations from the runserver command and use the new checks framework to check for unapplied migrations. Don't check for migrations if the DATABASES setting is empty.
2014-02-08 09:01:59 -05:00
Michael Manfre
3ffeb93186
Ensure cursors are closed when no longer needed.
...
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
2014-02-02 12:47:21 -05:00
Tim Graham
2b6914049a
Fixed #21849 -- Included the count of silenced system checks in output.
2014-01-28 08:31:02 -05:00
Wojciech Banaś
8f2f48ecc9
Fixed #21866 -- Replaced "COMMIT" in managmement command SQL with backend hook.
2014-01-26 12:42:41 -05:00
Aymeric Augustin
f901b4d6c8
Took advantage of the new get_model API. Refs #21702 .
2014-01-26 13:08:05 +01:00
Aymeric Augustin
ee4b806a85
Fixed #21873 -- Removed duplicate import.
...
Thanks Sephi for the report.
2014-01-25 23:22:03 +01:00
Russell Keith-Magee
d818e0c9b2
Fixed #16905 -- Added extensible checks (nee validation) framework
...
This is the result of Christopher Medrela's 2013 Summer of Code project.
Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian
Apolloner, and Alex Gaynor for review notes along the way.
Also: Fixes #8579 , fixes #3055 , fixes #19844 .
2014-01-20 10:45:21 +08:00
JustinTArthur
298a2b577f
Adjusted inspectdb management command to yield PEP 8-compliant output barring Django Coding Style exceptions.
2014-01-17 18:03:16 -05:00
Marc Tamlyn
ac8d0a4815
Remove unneded open(.., 'U') when on python 3.
...
Universal newlines is enabled by default on py3, and the usage of 'U' is
deprecated in py3.4.
2014-01-13 17:11:21 +00:00
Aymeric Augustin
0a7588dd3f
Fixed #21770 -- Updated autocomplete for app-loading.
...
Thanks dfunckt for the report.
2014-01-12 22:29:27 +01:00
Aymeric Augustin
d562527a16
Fixed #21477 -- Renamed db to using in pre/post_migrate signals.
2014-01-12 22:24:33 +01:00
Aymeric Augustin
2dcde523ab
Avoided catching ImproperlyConfigured on django.setup().
...
Fixed #21737 . Thanks Florian for the report.
Also removed redundant imports in that file.
2014-01-06 23:01:29 +01:00
Claude Paroz
aaf5b3e7aa
Moved django.setup() to ManagementUtility
...
In get_commands, setup() might already have been called, for example
when the management command is called through call_command. Moving
setup() to ManagementUtility so as it is only called when the command
is run from command line.
2014-01-02 20:47:40 +01:00
Aymeric Augustin
30a42a4fc3
Adjusted previous commit for Python 3.
2014-01-01 19:12:46 +01:00
Aymeric Augustin
0ce945a671
Fixed #21018 -- Reversed precedence order for management commands.
2014-01-01 18:11:15 +01:00
Aymeric Augustin
f17d00278e
Wiped get_commands() cache when INSTALLED_APPS changes.
...
Refs #21018 , #21688 .
2014-01-01 18:11:09 +01:00
Aymeric Augustin
a95f74e707
Oops.
2013-12-31 13:16:51 +01:00
Aymeric Augustin
6b172a6d6d
Called django.setup() explicitly in management commands.
...
This avoids duplicating code.
2013-12-31 13:11:05 +01:00
Aymeric Augustin
bfcc686d22
Removed the only_with_models_module argument of get_model[s].
...
Now that the refactorings are complete, it isn't particularly useful any
more, nor very well named. Let's keep the API as simple as possible.
Fixed #21689 .
2013-12-30 23:59:34 +01:00
Aymeric Augustin
1c242a297b
Merged Apps.populate_apps() and populate_models().
...
After the recent series of refactorings, there's no reason to keep
two distinct methods.
Refs #21681 .
2013-12-30 23:18:22 +01:00
Aymeric Augustin
0d2c8ff2be
Populated the app registry earlier at startup.
...
Refs #1796 , #21676 .
2013-12-30 22:11:16 +01:00
Aymeric Augustin
5892a83b18
Stopped calling get_models() for a side effect.
2013-12-29 21:48:58 +01:00