Commit Graph

1996 Commits

Author SHA1 Message Date
Russell Keith-Magee 6b63742ce5 Corrected expected test output to allow for cleanups in signal and compatibility checks. 2014-03-03 19:29:50 +08:00
Russell Keith-Magee c41335fa27 Added backwards compatibliity checks to reference documentation. 2014-03-03 19:20:48 +08:00
Russell Keith-Magee 21d8175242 Fixed #22193 -- Made hint a truly optional arugment on check messages.
Thanks to Thomas Güttler for the suggestion.
2014-03-03 19:16:19 +08:00
Russell Keith-Magee 82ac389486 Edited model and field checks for grammar and consistency. 2014-03-03 18:18:39 +08:00
Erik Romijn 98f13762d7 Fixed #22123 -- EmailValidator now also accepts IPv6 literals in addresses 2014-02-22 17:45:33 +01:00
Baptiste Mispelon 173aa51997 Fixed #21435 -- Improved error message when urlconf is empty.
The new error message now hints that the most likely issue
is a circular import.

Thanks to trac user elena for the report and to
bpeschier for the original patch.
2014-02-22 15:36:49 +01:00
Baptiste Mispelon 3841feee86 Fixed #22107 -- Fixed django.core.files.File object iteration.
Due to a mixup between text and bytes, iteration over
a File instance was broken under Python 3.

Thanks to trac user pdewacht for the report and patch.
2014-02-20 19:13:25 +01:00
Dmitro d3e33fff12 Made content_type_extra optional for TemporaryUploadedFile and MemoryUploadedFile.
This provides better backwards compatibility for those constructing these
objects manually.

Refs #13721.
2014-02-18 07:49:42 -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
MattBlack85 a8ba76c2d3 Fixed #19980: Signer broken for binary keys (with non-ASCII chars).
With this pull request, request #878 should considered closed.

Thanks to nvie for the patch.
2014-02-16 16:50:50 +01:00
Alex Gaynor cd7f37b647 Corrected a pair of flake8 violations 2014-02-15 10:42:12 -08:00
Grzegorz Nosek 0b6f9f7c6f Improved fix for #18373 -- backward compatibility
Commit 79558c78 cleaned up the (undocumented) interface of Resolver404
exception, which breaks compatibility with code messing with .args[0]
directly. Revert the cleanup part and simply leave the fix itself.
2014-02-15 17:51:18 +01:00
Tim Graham 65b421c661 Fixed some flake8 errors from recent commits. 2014-02-15 11:21:15 -05:00
Aaron France 1150053b99 Fixed #21912 -- Improved error message if a view returns None.
Thanks brycenesbitt for the report.
2014-02-15 11:18:16 -05:00
Grzegorz Nosek 79558c787e Fixed #18373 - improved handling of Resolver404s from views
When django.core.urlresolvers.resolve was called from a view, failed
and the exception was propagated and rendered by technical_404_response,
the URL mentioned on the page was the current URL instead of the URL
passed to resolve().

Fixed by using the path attribute from the Resolver404 exception instead
of request.path_info. Also cleaned up the exceptions to use standard
named parameters instead of stuffing a dict in args[0]
2014-02-15 15:56:04 +01:00
Rodolfo Carvalho 4d4e0ea461 Fixed two typos. 2014-02-15 15:16:16 +01:00
Tim Graham 8251438cb8 Moved relative URL handling added in refs #21177 to a better place.
Thanks apollo13: "reverse() shouldn't know about absolute/relative paths."
2014-02-15 07:54:35 -05:00
Antoine Catton e3d0790bd0 Fixed #21177 -- Made resolve_url support relative URLs.
This fixes redirecting to relative URLs with django.shortcuts.redirect.
2014-02-14 17:58:03 -05: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
Si Feng b102c27ff4 Fixed #20784 -- Added inverse_match parameter to RegexValidator. 2014-02-10 05:38:43 -05:00
Claude Paroz e2f28572b7 Merge pull request #2245 from funkybob/parse_header
Replaced _parse_content_type with cgi.parse_header
2014-02-09 20:39:07 +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
Andrew Godwin 38b4adc696 Merge pull request #2244 from mlavin/21856-migration-checks
Fixed #21856: Allow Empty DATABASES Setting
2014-02-09 10:46:57 +00:00
Curtis f43e895b15 Replace _parse_content_type with cgi.parse_header 2014-02-09 10:01:16 +11:00
Kevin Christopher Henry 6fe26bd3ee Fixed #19373 -- Ported Windows file locking from PyWin32 to ctypes
There wasn't any file locking under Windows unless PyWin32 was
installed. This removes that (undocumented) dependency by using ctypes
instead.

Thanks to Anatoly Techtonik for writing the ctypes port upon which this
is based.
2014-02-08 15:52:06 -05:00
Berker Peksag 5d263dee30 Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05: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
Aymeric Augustin 2ff93e027c Fixed #21829 -- Added default AppConfigs.
Thanks Russell for the report, Marc for the initial patch, Carl for the
final review, and everyone who contributed to the design discussion.
2014-01-25 10:41:56 +01:00
José Moreira 8649833cf8 fixed typo on docstring 2014-01-20 16:33:11 +00: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
Andrew Godwin a68f325791 Fixed #21638: Validators are now comparable, stops infinite user mig'ns 2014-01-19 18:56:16 +00: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
Marc Tamlyn 9d2c5b0420 Undelete the `return True` removed in 4e0a2fe.
This is quite important otherwise we don't close our connections to the
SMTP server.
2014-01-12 23:38:28 +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