Commit Graph

493 Commits

Author SHA1 Message Date
Ramiro Morales f73d04dda9 Removed 'cleanup' management command as per deprecation TL. 2013-06-28 21:48:16 -03:00
Russell Keith-Magee 0346563939 Fixed #20653 -- Renamed checksetup management command.
This is to allow future compatibility with work that is ongoing in the 2013 GSoC.
2013-06-25 09:37:54 +08:00
Ramiro Morales 1559f84d8b Fixed #20311 -- Make sure makemessages doesn't create duplicate Plural-Forms .po file headers.
Thanks naktinis for the report and initial patch.
2013-06-22 18:45:41 -03:00
Baptiste Mispelon fdbcbb9ebd Fixed #20632 -- Fixed {{ docs_version }} in project template 2013-06-20 15:39:58 +02:00
Aymeric Augustin ffcf24c9ce Removed several unused imports. 2013-06-19 17:18:40 +02:00
Florian Apolloner ffa8a9ab24 Fixed python 3.2 compat. 2013-06-14 15:44:45 +02:00
Daniel Lindsley 91f317c76d Added a ``checksetup`` management command for verifying Django compatibility. 2013-06-13 18:39:02 -07:00
Aymeric Augustin 55cbd65985 Fixed #20579 -- Improved TransactionTestCase.available_apps.
Also moved its documentation to the 'advanced' section. It doesn't
belong to the 'overview'. Same for TransactionTestCase.reset_sequences.

When available_apps is set, after a TransactionTestCase, the database
is now totally empty. post_syncdb is fired at the beginning of the next
TransactionTestCase.

Refs #20483.
2013-06-12 20:01:41 +02:00
Aymeric Augustin 13b7f299de Added a stealth option to flush to allow cascades.
This allows using flush on a subset of the tables without having to
manually cascade to all tables with foreign keys to the tables being
truncated, when they're known to be empty.

On databases where truncate is implemented with DELETE FROM, this
doesn't make a difference. The cascade is allowed, not mandatory.
2013-06-10 11:21:54 +02:00
Tim Graham 96c71d423d Added runserver validation to detect if DEBUG=False and ALLOWED_HOSTS is empty.
Refs #19875.
2013-06-09 15:08:29 -04:00
Chris Streeter 69373f3420 Fixed #19925 - Added validation for REQUIRED_FIELDS being a list
Thanks Roman Alexander for the suggestion.
2013-06-07 19:58:41 -04:00
Florian Apolloner c9d07d251f Fixed loaddata for Django checkouts with non ASCII chars in the name. 2013-06-03 13:18:16 +02:00
Aymeric Augustin 6900cb79dc Fixed small regression from 51aa000378.
A test failed if the path to the Django checkout contained a dot.

Refs #20485.
2013-06-03 11:48:03 +02:00
Aymeric Augustin 51aa000378 Fixed #20485 -- Refactored loaddata for speed.
Thanks Anssi for reporting this performance bottleneck.
2013-06-02 20:39:45 +02:00
René Fleschenberg 5090c7b58b Improved the usage message of the test command. 2013-05-31 13:16:54 -04:00
Tim Graham 59235816bd Fixed #20509 - Proper parsing for dumpdata --pks option.
Thanks weipin for the report and Baptiste Mispelon for the patch.
2013-05-30 10:19:13 -04:00
Claude Paroz 8010289ea2 Fixed #15697 -- Made sqlindexes aware of auto-created tables
Thanks mbertheau for the report and Ash Christopher for the
initial patch.
2013-05-29 15:50:26 +02:00
Tim Graham ded95ccdce Fixed #20484 -- Added model validation for GenericIPAddressField
GenericIPAddressField must not allow blank for NOT NULL fields

Thanks Erik Romijn.
2013-05-28 15:12:47 -04:00
Ramiro Morales 0fa8d43e74 Replaced `and...or...` constructs with PEP 308 conditional expressions. 2013-05-26 23:47:50 -03:00
Donald Stufft 3de1288042 Fixed #11398 - Added a pre_syncdb signal 2013-05-23 01:09:22 -04:00
Claude Paroz 51998dffe7 Removed check for 0.15 version of gettext tools
gettext 0.15 has been released in July 2006.
2013-05-22 18:21:33 +02:00
Jorge Bastida 888c86dcf3 Fixed #20445 -- Raised original exception after command error 2013-05-20 18:59:37 +02:00
Preston Holmes 6786920fd8 Fixed #16330 -- added --pks option in dumpdata command
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Senko Rasic c44a2c40fe Fixed #18990 -- Loaddata now complains if fixture doesn't exist
If the fixture doesn't exist, loaddata will output a warning.

The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.

Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Senko Rasic cc3b3ba93a Fixed #18990: Loaddata now complains if fixture doesn't exist
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +02:00
Donald Stufft a19e9d80ff Fixed #20430 - Enable iterable of iterables for model choices
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Baptiste Mispelon 9012a9e200 Fixed #20422 -- Applied makemessage's --ignore patterns to full path
Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch.
2013-05-18 10:40:16 +02:00
Aymeric Augustin 9c487b5974 Replaced an antiquated pattern.
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Daniel Lindsley 33793f7c3e Fixed #19934 - Use of Pillow is now preferred over PIL.
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-14 19:32:04 -07:00
Claude Paroz de8aa3a9a9 Fixed #20256 -- Corrected startproject --template help text
Thanks n0nam3 for the patch.
2013-05-08 09:55:40 +02:00
Tai Lee 99a6f0e77c Fixed #20354 -- `makemessages` no longer crashes with `UnicodeDecodeError`
Handle the `UnicodeDecodeError` exception, send a warning to `stdout` with the
file name and location, and continue processing other files.
2013-05-07 21:22:05 +02:00
Claude Paroz dcf563071f Fixed #5014 -- Guessed max_digits and decimal_places for SQLite
Decimal is treated as float on SQLite, hence inspectdb can only
guess max_digits and decimal_places arguments.
2013-04-01 18:32:57 +02:00
Preston Holmes e79b857a07 Fixed #18985 -- ensure module level deprecations are displayed
Also don't compete with -W CLI option.

Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
2013-03-24 22:06:02 -07:00
Anssi Kääriäinen 97774429ae Fixed #19385 again, now with real code changes
The commit of 266de5f9ae included only
tests, this time also code changes included...
2013-03-24 18:40:40 +02:00
konarkmodi bc4111ba68 Fixed #18003 -- Preserved tracebacks when re-raising errors.
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2013-03-19 15:42:39 -07:00
Aymeric Augustin 20a91cce04 Fixed #17037 -- Added a --all option to diffsettings. 2013-03-18 00:03:58 +01:00
Baptiste Mispelon d5683bd06b Fix #20058: Make compilemessages use stdout instead of stderr. 2013-03-16 19:48:40 +01:00
Aymeric Augustin a50e0c9fdc Fixed a refactoring error in ba5138b1.
Thanks Florian for tracing the error.
2013-03-11 22:40:13 +01:00
Aymeric Augustin 3f1efc44f6 Fixed loaddata command, broken in the previous merge. 2013-03-11 15:43:42 +01:00
Aymeric Augustin d04964e70d Used commit_on_success_unless_managed in loaddata. 2013-03-11 15:05:05 +01:00
Aymeric Augustin ba5138b1c0 Deprecated transaction.commit/rollback_unless_managed.
Since "unless managed" now means "if database-level autocommit",
committing or rolling back doesn't have any effect.

Restored transactional integrity in a few places that relied on
automatically-started transactions with a transitory API.
2013-03-11 14:48:54 +01:00
Aymeric Augustin 7aacde84f2 Made transaction.managed a no-op and deprecated it.
enter_transaction_management() was nearly always followed by managed().

In three places it wasn't, but they will all be refactored eventually.
The "forced" keyword argument avoids introducing behavior changes until
then.

This is mostly backwards-compatible, except, of course, for managed
itself. There's a minor difference in _enter_transaction_management:
the top self.transaction_state now contains the new 'managed' state
rather than the previous one. Django doesn't access
self.transaction_state in _enter_transaction_management.
2013-03-11 14:48:53 +01:00
Ramiro Morales 7fca4416c7 Made (make|compile)messages check for availability of gettext commands.
Refs #19584.
2013-03-10 17:31:11 -03:00
Claude Paroz 6a91b63842 Fixed #19923 -- Display tracebacks for non-CommandError exceptions
By default, show tracebacks for management command errors when the
exception is not a CommandError.
Thanks Jacob Radford for the report.
2013-03-09 12:38:45 +01:00
Claude Paroz e4bf0f2c36 Fixed #19942 -- Decoded errors coming from Popen commands
Thanks Aymeric Augustin for reporting the issue.
2013-03-03 20:00:44 +01:00
Claude Paroz 0657646cb8 Removed unused options copy in flush
This was used at the time the 'database' option did not default to
DEFAULT_DB_ALIAS in make_option.
2013-03-01 22:52:08 +01:00
Ramiro Morales 8459eac031 Move management helper function to new utils module.
This allows us to iremove an inter-command import.
2013-02-26 22:07:22 -03:00
Ramiro Morales dfa9324966 Don't use os.system() in compilemessages.
Fixes #19584.

This implies stop storing file path command line arguments in envvars as
a security measure to start relying on with Popen's shell=False instead,
and addition of an 'utils' module.

Thanks kmichel_wgs for the report.
2013-02-26 21:31:53 -03:00
Tomasz Rybak d7429defe6 Add sqldropindexes to manage
Change patch from https://code.djangoproject.com/ticket/5568
to work on modern Django.
Add special case for MySQL which has different syntax for DROP INDEX.
Add unit tests for the new functionality.
2013-02-24 12:38:28 +01:00
Russell Keith-Magee f5e4a699ca Fixed #19822 -- Added validation for uniqueness on USERNAME_FIELD on custom User models.
Thanks to Claude Peroz for the draft patch.
2013-02-15 09:00:55 +08:00