Commit Graph

108 Commits

Author SHA1 Message Date
Russell Keith-Magee edf68bede5 Cleanup of management.py; replaced uses of 'klass' with 'model', and normalized some variable naming in get_sql_create()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 03:55:07 +00:00
Malcolm Tredinnick 0016547e9b Fixed #2257 -- MySQL wants constraint names to be unique per-database, so fixed
the SQL generation to ensure this.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3373 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19 10:14:43 +00:00
Russell Keith-Magee 8c705f02a9 Added command line flag to disable use of auto-reloader on development server.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-14 05:43:26 +00:00
Russell Keith-Magee 9bea530c33 Disable use of terminal colors when django-admin is run on a Pocket PC.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-14 05:26:55 +00:00
Adrian Holovaty c1847294b8 Fixed #2301 -- Added list_display_links option to 'class Admin', which regulates which fields in the change list have links. Thanks, kilian
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-10 04:16:26 +00:00
Malcolm Tredinnick 5404e6e93b Fixed #2285 -- Tweaked the error message after model errors at "syncdb" time so
that we don't report an app name of "None".


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-05 05:11:20 +00:00
Malcolm Tredinnick a778c9de47 Fixed #1578 -- fixed a corner-case where we still wanting core=True attributes
on a model that was not being edited inline.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 10:48:07 +00:00
Russell Keith-Magee 2adbe11678 Fixes #2216 -- Added extra tests for model validity, and cleaned up warning messages for existing tests. Models are now invalid if the query string required to access a field (or related object) would clash with the name of another field (or related object). Previous tests only checked the accessor names, not the query string.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-27 15:21:43 +00:00
Russell Keith-Magee 23c24fc08b Fixes #1812 -- Added model validity checks to ensure that models.py exists, and has been successfully imported for all INSTALLED_APPS. Previous behaviour was to silently ignore empty/problem models, which resulted in the display of an admin page that doesn't display a supposedly installed model. Thanks to Ian Holsman for the original report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-25 04:24:15 +00:00
Russell Keith-Magee 0d4b5b9b4a Fixed #1662 -- Added resolver for string-form model references for models that have already been loaded, with tests to validate both forward and backward referenced model names. Light refactoring of model loading to make regression tests behave more like normal model loading. Also clarifies the text of some validation errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 04:37:00 +00:00
Malcolm Tredinnick ba22f55aa2 Fixed #1928 -- Correctly create foreign key references when there are multiple
keys on multiple models. Based on a patch from Geert Vanderkelen and some
diagnosis from hornero.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 03:39:47 +00:00
Malcolm Tredinnick 92571b0d48 Fixed #2119 -- fixed problems with splitting SQL statements into separate
statements. Uses a patch from eaw@woudy.org and some contributions from
jpellerin@gmail.com. Also fixes #2034 and #1935.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 08:00:44 +00:00
Malcolm Tredinnick 3e97535907 Fixed #2161 -- handle trailing newlines in initial SQL data. Includes
regression test. Thanks to russellm.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 07:12:45 +00:00
Adrian Holovaty 32228d2031 Added django/core/servers/fastcgi.py and manage.py 'runfcgi' option. Thanks, jcrasta@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 05:24:19 +00:00
Jacob Kaplan-Moss bca5327b21 Added generic foreign key support to Django. Much thanks to Ian Holsman and
Luke Plant -- most of this code is theirs.  Documentation is to follow; for now
see the example/unit test.  Fixes #529.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-16 19:18:30 +00:00
Adrian Holovaty 22da62f239 Fixed #1503 -- Improved model validator to throw an error if a model doesn't manually define a primary key and has a field named 'id', which conflicts with the auto-primary-key convention. Thanks, mir@noris.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 04:22:42 +00:00
Adrian Holovaty 0b92bd11db Removed legacy deprecated_args check from django.core.management
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 04:15:18 +00:00
Adrian Holovaty 1926428a55 Fixed #2098 -- Loosened validation for model 'ordering' parameter by allowing periods. Thanks, Alex Dedul
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 02:47:53 +00:00
Adrian Holovaty f3f002b161 Fixed #1697 and #2095 -- Made 'choices' parameter accept any iterable
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 02:46:08 +00:00
Jacob Kaplan-Moss 42a34423f2 Fixed stupid bug in [3802]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-05 15:25:12 +00:00
Jacob Kaplan-Moss 55b6559b0e Small refactoring of django.core.management to allow a custom argv to be passed into execute_manager(). This makes custom manage scripts with extra options possible
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3082 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-05 15:20:47 +00:00
Adrian Holovaty 88d215f702 Fixed #2073 -- Improved 'manage.py shell' not to pass argv to IPython if it's installed. Thanks, jpellerin@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-02 19:04:09 +00:00
Adrian Holovaty d3b1a9ba39 Fixed #2015 -- Fixed sqlinitialdata regexp to handle empty string insertions. Thanks, Steven Armstrong
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3003 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-30 01:11:27 +00:00
Adrian Holovaty 0fd9eef86f Fixed #1935 -- Initial SQL data now works in SQLite if there are multiple statements. Thanks, jpellerin@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 05:20:21 +00:00
Malcolm Tredinnick 816b65f260 Prevent people from using "startapp" to create apps with the same name as their project. Might stop some of the accidents.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-19 07:40:06 +00:00
Adrian Holovaty c63372f3c4 Fixed #1819 -- inspectdb no longer puts null=True for TextField and CharField. Thanks, mir@noris.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-09 15:36:14 +00:00
Adrian Holovaty 058ab898b0 Improved runserver to display 'CONTROL-C' vs. 'CTRL-BREAK' based on the current platform
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 03:29:22 +00:00
Adrian Holovaty cca0e7346d Fixed #1762 -- Fixed Windows error in django.core.management. Thanks, ross.lazarus@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-05 04:08:14 +00:00
Adrian Holovaty 427a54b4a3 Fixed #1719 -- Added rlcompleter autocompletion to 'manage.py shell' if IPython is not used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-05 03:17:51 +00:00
Adrian Holovaty 9fec605d8d Fixed #1766 -- Fixed bug in syncdb where it allowed two models to have the same database table. Thanks, Ian Clelland
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-05 02:38:32 +00:00
Adrian Holovaty f69cf70ed8 MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00
Adrian Holovaty e3e271ff92 Fixed #1600 -- Renamed ManyToMany to ManyToManyRel so people get a clearer error if they use ManyToMany instead of ManyToManyField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-04-10 03:32:38 +00:00
Adrian Holovaty c72afb811b Changed 'runserver' to display the Django version, and massaged the wording a little bit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 23:48:11 +00:00
Adrian Holovaty 53ca15cd78 Fixed #1289 -- Improved 'inspectdb' to introspect decimal_places and max_digits for FloatFields. Thanks, gandalf@owca.info
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 23:04:09 +00:00
Adrian Holovaty 4d1bb30480 Reworded comment atop inspectdb-generated models to imply primary_key may now be introspected
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 22:06:42 +00:00
Adrian Holovaty 5710c6e2db Changed get_indexes() hook from [2346] to return 'primary_key' instead of 'keyname'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 21:57:38 +00:00
Adrian Holovaty ac97cf54af Fixed #1286 -- Improved 'inspectdb' so that it introspects primary_key=True and unique=True for MySQL. Thanks, gandalf@owca.info
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-18 21:26:28 +00:00
Adrian Holovaty a10e8153f3 Fixed #1177 -- Added django.VERSION and '--version' command to django-admin.py/manage.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-17 18:33:09 +00:00
Adrian Holovaty c59901a467 Improved 'inspectdb' handling of Python keywords from [2271] to use the 'keywords' module rather than hard-coding the list of keywords.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-04 20:18:18 +00:00
Adrian Holovaty 9423c4e4a8 Fixed #1328 -- Improved 'inspectdb' to handle Python reserved words as field names. Also updated docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-04 20:08:30 +00:00
Adrian Holovaty 9789766508 Fixed #1311 -- manage.py sqlclear no longer assumes database connection is available. Thanks, jakamkon@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-02 04:50:16 +00:00
Adrian Holovaty 2667ead885 Fixed #1165 -- Fixed bug in generated CREATE TABLE statements where a primary key related to a PositiveIntegerField or PositiveSmallIntegerField. Thanks, avandorp@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-15 05:48:13 +00:00
Adrian Holovaty e260037e16 Fixed #1218 -- Improved model validator to complain for non True/False values for 'db_index' parameter
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-15 01:15:44 +00:00
Adrian Holovaty 5e6d6fafae Fixed #1202 -- Changed 'manage.py shell' to use IPython if present. Also added '--plain' option, which overrides IPython to use the standard Python interactive prompt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-12 20:56:10 +00:00
Adrian Holovaty b94d78772f Added 'shell' option to django-admin.py and manage.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-11 01:57:22 +00:00
Adrian Holovaty 6719511497 Fixed #1187 -- Added field name to error message for missing PIL. Thanks, akaihola
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-01-08 06:31:24 +00:00
Adrian Holovaty 28263d6675 Added conf/project_template/manage.py, which is a light wrapper around django-admin.py that gets installed in each project with 'startproject'. It takes care of the PYTHONPATH and DJANGO_SETTINGS_MODULE business automatically.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-06 05:53:31 +00:00
Adrian Holovaty 17108bc190 Negligible capitalization change in django.core.management
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-06 05:38:56 +00:00
Adrian Holovaty 50cac9d276 Factored out django.core.management ACTION_MAPPING into DEFAULT_ACTION_MAPPING, so execute_from_command_line now takes an action_mapping parameter (DEFAULT_ACTION_MAPPING by default)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-06 05:35:07 +00:00
Adrian Holovaty 6d210ef403 Moved all logic from django-admin.py into django.core.management, into a new execute_from_command_line() function, so it can be called from other scripts. Also improved createproject to disallow 'django' and 'test' as project names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-12-06 05:17:52 +00:00