Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz
6fd1950a4e
Fixed #10200 -- Raised CommandError when errors happen in loaddata.
2012-06-07 10:32:10 +02:00
Claude Paroz
f0664dc8ae
Made TestNoInitialDataLoading pass with MySQL (Refs #15926 )
2012-06-06 13:54:40 +02:00
Honza Kral
fedac99c85
Fixed #15926 -- Added option --no-initial-data to syncdb and flush.
...
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-06-05 16:46:15 +02:00
Ramiro Morales
72130385bf
Made inspectdb tests deal with a smaller generated models.py file.
...
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Claude Paroz
cc4b4d9fd3
Used CommandError in createcachetable command.
...
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz
f2b6763ad7
Fixed #18387 -- Do not call sys.exit during call_command.
...
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Claude Paroz
12f4bd74fc
Removed unneeded sys import added in previous commit
2012-05-26 11:53:33 +02:00
Claude Paroz
3b5083bee5
Fixed #5423 -- Made dumpdata output one row at a time.
...
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz
edfa95c22f
Specified when open should use binary mode.
...
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Claude Paroz
822d6d6dab
Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class
2012-05-19 13:51:54 +02:00
Claude Paroz
bb4452f212
Fixed #18019 -- Use threaded runserver only when database supports it.
2012-05-15 09:21:10 +02:00
Claude Paroz
d7dfab59ea
Replaced cStringIO.StringIO by io.BytesIO.
...
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz
865cd35c9b
Made more extensive usage of context managers with open.
2012-05-05 14:06:36 +02:00
Aymeric Augustin
e84f79f051
Fixed #18042 -- Advanced deprecation warnings.
...
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Anssi Kääriäinen
4fdd378beb
Skip model validation when models are known good.
...
In some situations Django calls model validation when the models are
already known good. This is most visible in tests, which use flush
and loaddata commands. This resulted in around 10% overhead when
running tests under sqlite.
2012-05-01 08:40:04 +03:00
Claude Paroz
596cb9c7e2
Replaced print statement by print function (forward compatibility syntax).
2012-04-30 20:45:03 +02:00
Claude Paroz
3904b74a3f
Fixed #18013 -- Use the new 'as' syntax for exceptions.
...
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Anssi Kääriäinen
527cce80dc
Made table_names() output sorted.
...
Fixed #18218 -- previously Django's introspection table_names() and
get_table_list() methods did not sort the output consistently. This
resulted in random order of inspected models.
This commit also removed all external usages of get_table_list().
table_names() should be used instead.
Thanks to claudep for patch and report.
2012-04-29 02:11:55 +03:00
Adrian Holovaty
21f11e5280
Updated compilemessages and makemessages management commands to change SVN->Git references
2012-04-27 22:37:59 -05:00
Claude Paroz
ddc5d59c6a
Fixed #15076 -- Quoted ForeignKey target class names in inspectdb when class is defined below.
...
Thanks saschwarz for the report, jeff@deserettechnology.com for the initial patch and Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-27 06:56:31 +00:00
Claude Paroz
c34d069a75
Removed direct print statements from django management commands.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-26 19:56:20 +00:00
Alex Gaynor
3c5ff9d703
Fixed #5893 -- Added a flag to FilePathField to allow listing folders, in addition to regular files. Thank you to Brian Rosner, for encouraging me to first contribute to Django 4 years ago.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-22 14:44:08 +00:00
Claude Paroz
5c53e30607
Fixed #18035 -- Removed deprecated AdminMediaHandler, as per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-08 21:13:32 +00:00
Aymeric Augustin
d38690796c
Removed the deprecated reset and sqlreset management commands.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 12:38:11 +00:00
Claude Paroz
23d3459761
Fixed #17965 -- Definitely dropped support for Python 2.5. Thanks jonash for the initial patch and Aymeric Augustin for the review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 08:24:29 +00:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Claude Paroz
8c54d7cf71
Fixed #17947 -- Fixed language restore after management command even when exceptions occur. Thanks andrey@kostenko.name for the report and the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29 16:33:48 +00:00
Jannis Leidel
4219e2b7f8
Fixed #17920 -- Actually pass the full path of a newly created project or app in the template context as mentioned in the startproject docs. Many thanks to Preston Holmes for the initial patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-21 22:29:32 +00:00
Ramiro Morales
c6425aafa5
Fixed #17820 -- Fixed more occurrences of redundant handling of management commands options.
...
They had been missen in the first attempts or had been introduced afterwards.
Refs #13760 , #10080 , #17799 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-10 17:50:59 +00:00
Carl Meyer
89b57a7c77
Added missing newline to makemessages output. Thanks Florian Apolloner for report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 20:34:46 +00:00
Paul McMillan
239e41f7c5
Cleanup to use get_random_string consistently.
...
Removes several ad hoc implementations of get_random_string()
and removes an innapropriate use of settings.SECRET_KEY.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 21:39:12 +00:00
Adrian Holovaty
7981efe04f
Documentation (and some small source code) edits from [17432] - [17537]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-17 20:04:11 +00:00
Adrian Holovaty
7ecb6813c9
Fixed missing periods in django-admin help for startproject from [17432]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17538 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-17 16:51:22 +00:00
Ramiro Morales
a411242e94
Fixed #17676 -- Fixed introspection of column names that start with digit(s).
...
Thanks Gandalfar for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 20:53:48 +00:00
Jannis Leidel
538257b4ae
Fixed #10080 -- Slightly extended the fix made in r10401 by also taking command line options into account that don't have have a default set. Thanks, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:56:41 +00:00
Aymeric Augustin
175e6d77df
Fixed #11745 -- Grouped commands by application in the output of `manage.py help`. Made 'version' consistent with 'help' while I was in the area, and added tests. Thanks Jannis for the feedback and review.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-07 18:46:29 +00:00
Julien Phalip
ad8ebb7006
Fixed #8317 -- Corrected the inspectdb management command to properly set `primary_key=True` and `unique=True` on foreign keys. Thanks to bthomas for the report and patch, and to David Gouldin for the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-05 07:51:37 +00:00
Ramiro Morales
9b762d170a
Made a couple of idiomatic changes in makemessages.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 22:12:58 +00:00
Ramiro Morales
2894ec71c9
Removed hard-coded root tree path in makemessages.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 21:44:31 +00:00
Ramiro Morales
a4f68c1b40
Fixed undefined variable name in makemessages command code.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 20:02:46 +00:00
Julien Phalip
d3154d1896
Fixed #8291 -- Allowed 'pk' to be used as an ordering option in `Model.Meta`. Thanks to peterd12 for the report and to evan_schulz, gruszczy, frog32 and David Gouldin for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 19:56:40 +00:00
Jannis Leidel
c6065545ef
Fixed #17628 -- Extended makemessages command to also ignore directories when walking, not only when looking for files. Thanks, Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 18:27:24 +00:00
Jannis Leidel
faeee611d6
Fixed #17517 -- Added `--name` option to startproject and startapp management commands to be able to render files without a file extension. Thanks, Florian Apolloner.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 13:01:30 +00:00
Jacob Kaplan-Moss
e8e4293a48
Fixed #17078 : properly invoke IPython 0.12.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-19 17:38:56 +00:00
Jannis Leidel
aef0283f89
Fixed #17468 -- Made sure the project/app template management command tests correctly handle an existing directory on Windows.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-15 16:06:56 +00:00
Luke Plant
4e29b70b9d
Fixed #17530 - Fixture loading with deferred constraints broken for Postgres for fixtures from multiple dirs/files
...
Thanks to claudep for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-14 17:26:32 +00:00
Aymeric Augustin
19c544ff42
Fixed #17300 -- Prevented createcachetable from crashing when the cache table already exists. Thanks Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 20:00:30 +00:00
Aymeric Augustin
40f0ecc56a
Implemented PEP386-compatible version numbers. Thanks Jannis for the guidance.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 15:05:15 +00:00
Carl Meyer
bc63ba700a
Fixed #17503 -- A destination directory passed to startproject or startapp as optional second argument is now reused as the project/app directory, rather than a new project/app directory created within it. Refs #17042 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-04 23:55:34 +00:00