summaryrefslogtreecommitdiff
path: root/django/core/management.py
AgeCommit message (Collapse)Author
2007-08-16Major refactoring of django.core.management -- it's now a package rather ↵Adrian Holovaty
than a 1730-line single module. All django-admin/manage.py commands are now stored in separate modules. This is backwards-incompatible for people who used django.core.management functions directly git-svn-id: http://code.djangoproject.com/svn/django/trunk@5898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-14Made some negligible formatting changes to django/core/management.pyAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11Fixed #4827 -- Fixed a problem when converting Unicode table names to ↵Malcolm Tredinnick
upper-case in Oracle backend. Based on a patch from timchen119@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-06Fixed #5082 -- Enabled tab completion in 'django-admin.py shell' for objects ↵Adrian Holovaty
that were imported into the global namespace at runtime. Thanks, dusk@woofle.net git-svn-id: http://code.djangoproject.com/svn/django/trunk@5809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms ↵Gary Wilson Jr
`FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-28Fixed #4460 -- Added the ability to be more specific in the test cases that ↵Russell Keith-Magee
are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23Fixed #3771 -- Modified the test runner to observe the --noinput argument ↵Russell Keith-Magee
controlling script interactivity. This means that test scripts can now be put in a buildbot environment. This is a backwards incompatible change for anyone that has written a custom test runner. Thanks for the suggestion, moof@metamoof.net. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-21Fixed #4304 -- Modified sys.exit to os._exit to make sure development server ↵Russell Keith-Magee
quits when an error occurs attempting to bind to the requested port (e.g., if another server is already running). Thanks, Mario Gonzalez <gonzalemario@gmail.com>. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20Simplified the indent level in management.py _get_sql_model_create() by ↵Adrian Holovaty
using a 'continue' statement rather than nesting everything in an 'if' git-svn-id: http://code.djangoproject.com/svn/django/trunk@5726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20Added a db_type() method to the database Field class. This is a hook for ↵Adrian Holovaty
calculating the database column type for a given Field. Also converted all management.py CREATE TABLE statements to use db_type(), which made that code cleaner. The Field.get_internal_type() hook still exists, but we should consider removing it at some point, because db_type() is more general. Also added docs -- the beginnings of docs on how to create custom database Field classes. This is backwards-compatible. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-14Fixed #4731 -- Changed management.setup_environ() so that it no longer assumesMalcolm Tredinnick
the settings module is called "settings". Patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-03Fixed #4688 -- startproject no longer breaks when Django files are ↵Adrian Holovaty
read-only. Thanks, tstromberg@google.com and Google guys git-svn-id: http://code.djangoproject.com/svn/django/trunk@5593 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. AllMalcolm Tredinnick
expected tests pass for all databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23Fixed #4607 -- Tweaked checks for features missing in Python 2.3 to not assumeMalcolm Tredinnick
things Python does not guarantee. Patch from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-10Fixed #4517 -- Made sure that URL_VALIDATOR_USER_AGENT includes the up-to-dateMalcolm Tredinnick
Django version number. Thanks, James Wheare. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-26Fixed #4372 -- Fixed a small typo in an error message. Thanks, John Shaffer.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the codeMalcolm Tredinnick
to return Decimal instances in Python for this field. Backwards incompatible change. Added a real FloatField (stores floats in the database) and support for FloatField and DecimalField in newforms (analogous to IntegerField). Included decimal.py module (as django.utils._decimal) from Python 2.4. This is license compatible with Django and included for Python 2.3 compatibility only. Large portions of this work are based on patches from Andy Durdin and Jorge Gajon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-15Fixed some documentation strings in django-admin, and updated the bash ↵Russell Keith-Magee
completion script. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14Added check to prevent sequence reset if no fixtures are loaded.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14Fixed #4288 -- Modified serializers to pay attention to the to_field ↵Russell Keith-Magee
attribute on ForeignKeys. Thanks to Sandro Dentella for the report and the helpful test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08Moved generic relations into django.contrib.contenttypes, since it depends onMalcolm Tredinnick
that to work. Backwards incompatible change. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-01Fixed #3905 -- Report app_name correctly in errors during custom SQLMalcolm Tredinnick
installation. Thanks, kbussell@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-27Fixed #2608 -- Generate correct SQL for multi-level foreign key relations.Malcolm Tredinnick
Based on a patch from Gopal Narayanan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-27Fixed #3954 -- Disabled termcolors when loading fixtures. Well spotted, ↵Russell Keith-Magee
Vijay Sajip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26Fixed #4040 -- Changed uses of has_key() to "in". Slight performanceMalcolm Tredinnick
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-09Fixed #3846 -- Fixed misleading variable name in 'startapp' code. Thanks, ↵Adrian Holovaty
MarioGonzalez git-svn-id: http://code.djangoproject.com/svn/django/trunk@4989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-06Fixed #3790 -- Fixed a problem with sequence resetting during fixture loads ↵Russell Keith-Magee
when using Postgres. Thanks to Jon Ballard and scott@staplefish.com for the report, and to Zach Thompson for suggesting a solution. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-27Fixed #3822 -- Changed get_indexes_for_model() in django.core.management to ↵Adrian Holovaty
quote index names. Thanks, Robin Breathe git-svn-id: http://code.djangoproject.com/svn/django/trunk@4835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-27Improved error reporting when fixture files are provided in an unknown ↵Russell Keith-Magee
serialization format. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-23Fixed #3779 -- Resolved problem with order of creation of m2m tables during ↵Russell Keith-Magee
syncdb. Well spotted, Ben Slavin, and thanks for the very helpful test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4780 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-13Modified the internal dumpdata implementation to return the dumped data, ↵Russell Keith-Magee
rather than just printing to screen. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-07Removed rsplit() usage for python2.3 compatibility. Refs #3625.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-02Added option to pretty-print dumped fixture outputRussell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-01Fixes #2333 -- Added test fixtures framework.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26Fixed #3390: the serializer can now contain forward references. Thanks, Russ.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26Fixed #3253 -- Exposed the number of failed tests as a return code in ↵Russell Keith-Magee
manage.py and runtests.py. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-17Added workaround for loading duplicate model classes in management shell. PatchMalcolm Tredinnick
from Curtis Thompson and Benjamin Slavin. Refs #1796. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-25Fixed #3299 -- Added 'site' to the list of INVALID_PROJECT_NAMES and ↵Adrian Holovaty
improved the error message. Thanks for the patch, ubernostrum git-svn-id: http://code.djangoproject.com/svn/django/trunk@4424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07Fixed #2452: comments can now be put within initial SQL files. Thanks, ↵Jacob Kaplan-Moss
Pawel J. Sawicki. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30Fixed #2968 -- Changed arguments to __import__ to use empty dictionary ↵Adrian Holovaty
instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-27Fixed #2956 -- Made 'django-admin.py startproject' tolerant of filesystem ↵Adrian Holovaty
arrangements that cannot accept file-permission changes. Thanks for the patch, masonsimon+django@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@3941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-24Fixed #2932 -- Added more details to the warning message in 'manage.py ↵Adrian Holovaty
reset'. Thanks for the patch, pb@e-scribe.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@3932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-09Fixed problem with debug message arguments.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3897 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03Modified sql_index function names to match pattern established by ↵Russell Keith-Magee
initial_data functions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03Refs #1828 -- Added creation of indexes as a step in syncdb. This is an ↵Russell Keith-Magee
interim solution; the long term solution requires a non-trivial refactoring of syncdb, install and the get_* calls in management.py. Thanks to mdt@emdete.de for the original report, and to Simon Greenhill for prodding me to an interim fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03Cleaned up and clarified some log messages and docstrings.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03Factored out per-model index generation code.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03Modified the default verbosity to be 1 (normal), and added some syncdb ↵Russell Keith-Magee
messages at verbosity 2. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-03Added ability to use --noinput flag for application reset.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3888 bcc190cf-cafb-0310-a4f2-bffc1f526a37