Commit Graph

2902 Commits

Author SHA1 Message Date
Phil Bazun cc5c1b7568 Fixed #27870 -- Cleaned up ManagementUtility.autocomplete(). 2017-02-22 09:15:50 -05:00
Anton Samarchyan 5a6f70b428 Refs #27656 -- Updated django.core docstring verbs according to PEP 257. 2017-02-21 11:58:42 -05:00
amalia 2f10216f84 Fixed #27820 -- Fixed RequestDataTooBig/TooManyFieldsSent crash. 2017-02-13 16:19:03 -05:00
Tim Graham 0595bca221 Fixed #27742 -- Reverted "Fixed #24607 -- Serialized natural keys in multi-table inheritance models."
This reverts commit 74a575eb72 as it causes
unexpected migrations and doesn't seem to be the best solution.
2017-02-11 06:34:59 -05:00
Claude Paroz d4b00c5c24 Removed WSGIServer.server_bind() identical to parent version
The method customization was removed in 2ca00faa91.
2017-02-11 11:16:35 +01:00
Nadège Michel bece837829 Fixed #20238 -- Added threading support to LiveServerTestCase. 2017-02-09 19:08:32 -05:00
Tim Graham 500532c95d Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode(). 2017-02-09 09:03:47 -05:00
Claude Paroz 3a148f958d Refs #27795 -- Removed force_text from the template layer
Thanks Tim Graham for the review.
2017-02-07 17:14:02 +01:00
Claude Paroz c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
Claude Paroz 2757209c9d Refs #27795 -- Removed force_text from templatize function 2017-02-06 17:35:03 +01:00
Tim Graham 29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Vytis Banaitis 8838d4dd49 Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. 2017-02-01 11:41:56 -05:00
Claude Paroz 277a4dd4b4 Fixed #27793 -- Used stdlib's ipaddress module to validate IP addresses
Thanks Tim Graham for the review.
2017-01-30 14:22:18 +01:00
Claude Paroz 068cd60366 Removed unneeded parentheses in class definitions 2017-01-29 18:06:26 +01:00
Srinivas Reddy Thatiparthy a6755b29e9 Removed obsolete sentence in ManagementUtility docstring. 2017-01-28 08:09:42 -05:00
Ed Morley 751d77cdd9 Refs #27537 -- Added default_addr(_ipv6) attributes to runserver command. 2017-01-27 13:30:27 -05:00
Claude Paroz fee42fd99e Refs #23919 -- Replaced usage of django.utils.http utilities with Python equivalents
Thanks Tim Graham for the review.
2017-01-26 19:49:03 +01:00
Vytis Banaitis d1bab24e01 Refs #23919, #27778 -- Removed obsolete mentions of unicode. 2017-01-26 08:19:27 -05:00
Tim Graham 1c466994d9 Refs #23919 -- Removed misc Python 2/3 references. 2017-01-25 13:59:25 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Tim Graham 632c4ffd9c Refs #23919 -- Replaced errno checking with PEP 3151 exceptions. 2017-01-25 10:13:08 -05:00
Mads Jensen ebf34c3cdc Removed unused variables that are overwritten. 2017-01-25 09:14:05 -05:00
Claude Paroz 6e55e1d88a Refs #23919 -- Replaced six.reraise by raise 2017-01-22 20:08:04 +01:00
Tim Graham d170c63351 Refs #23919 -- Removed misc references to Python 2. 2017-01-21 20:02:00 -05:00
Mariusz Felisiak c22212220a Refs #23919 -- Removed re.U and re.UNICODE (default on Python 3). 2017-01-21 14:28:16 -05:00
Tim Graham 9e6e32bf5d Refs #23919 -- Removed django.utils.decorators.available_attrs() usage.
It's only needed to workaround a bug on Python 2.
2017-01-21 13:20:17 -05:00
Claude Paroz 042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Tim Graham 4e729feaa6 Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Srinivas Reddy Thatiparthy ec4c1d6717 Removed u'' prefx in django/core/signing.py comment. 2017-01-20 07:38:17 -05:00
Claude Paroz dc8834cad4 Refs #23919 -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01:00
Tim Graham 9e917cc291 Fixed #23905, refs #23919 -- Used make_msgid() from stdlib. 2017-01-19 12:58:19 -05:00
Simon Charette 9695b14982 Refs #23919 -- Removed str() conversion of type and method __name__. 2017-01-19 11:31:07 -05:00
Simon Charette 4c5ed3e683 Refs #23919 -- Removed __nonzero__() methods (for Python 2).
Thanks Tim for the review.
2017-01-19 11:26:26 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Aymeric Augustin a556396339 Refs #23919 -- Replaced io.open() with open().
io.open() is an alias for open() on Python 3.
2017-01-18 21:45:12 -05:00
Aymeric Augustin eb422e476f Refs #23919 -- Removed obsolete __ne__() methods.
__ne__() defaults to the opposite of __eq__() on Python 3
when it doesn't return NotImplemented.
2017-01-18 21:44:00 -05:00
Aymeric Augustin 3cc5f01d9b Refs #23919 -- Stopped using django.utils.lru_cache(). 2017-01-18 21:42:40 -05:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham 6192bffb13 Refs #26601 -- Removed obsolete system check for MIDDLEWARE_CLASSES setting. 2017-01-17 20:52:05 -05:00
Tim Graham 98760ab0b2 Refs #25079 -- Removed obsolete system check for TEMPLATE_* settings. 2017-01-17 20:52:05 -05:00
Tim Graham d334f46b7a Refs #26601 -- Removed support for old-style middleware using settings.MIDDLEWARE_CLASSES. 2017-01-17 20:52:04 -05:00
Tim Graham 2d7fb77987 Refs #23832 -- Removed deprecated non-timezone aware Storage API. 2017-01-17 20:52:03 -05:00
Tim Graham bc3540ce2c Refs #26013 -- Removed deprecated django.core.urlresolvers module. 2017-01-17 20:52:02 -05:00
Tim Graham f65b1aee71 Refs #25838 -- Removed the deprecated shell --plain option. 2017-01-17 20:52:02 -05:00
Tim Graham e0910dcc92 Refs #25604 -- Removed makemigrations --exit option per deprecation timeline. 2017-01-17 20:52:01 -05:00
Tim Graham 3cee9edd1b Refs #24733 -- Removed support for error views without the exception parameter.
Per deprecation timeline.
2017-01-17 20:52:00 -05:00
Markus Holtermann 45ded053b1 Fixed #27666 -- Delayed rendering of recursivly related models in migration operations. 2017-01-17 08:12:52 -05:00
Peter Inglesby 0b2e5da6ed Fixed #27721 -- Added interface name to shell's IPython/bython import error. 2017-01-12 13:12:21 -05:00
Tim Graham 823af53bf6 Fixed #27707 -- Removed shell support for IPython < 1.0. 2017-01-09 12:02:43 -05:00
David Sanders e5e3747357 Fixed #27705 -- Added protocol/server_cls attributes to runserver for extensibility. 2017-01-09 10:41:33 -05:00
Sebastian Spiegel 8b734d2f99 Fixed #27432 -- Made app_label arguments limit showmigrations --plan output. 2017-01-06 19:50:31 -05:00
Claude Paroz 9390533951 Fixed #27696 -- Measured email long lines on encoded content
Thanks Pavel Pokrovskiy for the report and Tim Graham for the review.
2017-01-06 16:04:59 +01:00
Jeroen van Veen ed4264c5a4 Fixed #27522 -- Fixed runserver autoreload when using staticfile's options.
On a SyntaxError, made runserver exit with a stacktrace when using
contrib.staticfiles's runserver options such as --nostatic.
2017-01-02 08:57:50 -05:00
Adam Chainz 5eff8a7783 Fixed #25415 -- Made DiscoverRunner run system checks. 2016-12-29 12:33:24 -05:00
Simon Charette 813805833a Fixed #27631 -- Prevented execution of transactional DDL statements when unsupported.
Executing a DDL statement during a transaction on backends that don't support
it silently commits, leaving atomic() in an incoherent state.

While schema_editor.execute() could technically be used to execute DML
statements such usage should be uncommon as these are usually performed through
the ORM. In other cases schema_editor.connection.execute() can be used to
circumvent this check.

Thanks Adam and Tim for the review.
2016-12-28 19:43:32 -05:00
Adam Chainz 8669cf0e68 Fixed #27626 -- Moved MEDIA_URL/STATIC_URL validation to a system check. 2016-12-23 10:55:00 -05:00
Tim Graham bcae045de0 Refs #26487 -- Removed unneeded ehlo() calls in SMTP backend.
starttls(), login(), and other connection methods already call
the method as needed.
2016-12-23 09:22:23 -05:00
jpic bf6392bb75 Fixed #27600 -- Suppressed the REPL during shell's reading from stdin.
Thanks Adam Chainz for review and guidance.
2016-12-21 17:05:33 -05:00
Andrew Nester 24fa728a47 Fixed #27612 -- Added a check for duplicate URL instance namespaces. 2016-12-21 16:54:15 -05:00
Tim Graham c27104a9c7 Fixed #27611 -- Doc'd that CSRF_COOKIE_HTTPONLY setting offers no security. 2016-12-19 17:56:58 -05:00
Raphael Michel 33e86b3488 Refs #16859 -- Disabled CSRF_COOKIE_* checks when using CSRF_USE_SESSIONS. 2016-12-17 09:59:48 -05:00
Tim Graham 7a4e2fc5a2 Fixed #27588 -- Removed unneeded colon in makemigrations output. 2016-12-12 09:38:13 -05:00
Anton Bazhanov e690eb405f Refs #27505 -- Made Paginator's exception messsages translatable. 2016-12-01 08:39:48 -05:00
Keda87 48826aa541 Fixed #27546 -- Removed hardcoded class names in __repr__() methods. 2016-12-01 08:11:09 -05:00
Lex Berezhny 8eb56f3c78 Fixed #27507 -- Used SchemaEditor.execute() to run deferred_sql in migrate's sync_apps(). 2016-11-29 20:00:16 -05:00
Ramin Farajpour Cami 967be82443 Fixed E305 flake8 warnings. 2016-11-14 12:30:46 -05:00
Claude Paroz 8858631498 Fixed #27469 -- Prevented sending email to empty addresses
Thanks Jarek Glowacki for the report.
2016-11-10 19:47:02 +01:00
Paweł Marczewski 50f9e736fa Fixed #27438 -- Added the diffsettings --default option. 2016-11-10 07:50:49 -05:00
Joseph Kahn 373c6c409c Fixed #27461 -- Fixed incorrect allow_migrate() arguments in makemigrations. 2016-11-09 10:27:19 -05:00
Zbigniew Siciarz f94ce0d21d Fixed #27436 -- Fixed makemigrations crash when creating migrations on a separate drive than where Django is installed. 2016-11-08 18:06:17 -05:00
Ana Balica bafc9f9c33 Fixed #27423 -- Simplified sys.exit() for indicating test failures. 2016-11-03 12:40:59 +01:00
wim glenn 21dd792349 Fixed #26578 -- Prohibited non-ASCII digits in validate_ipv4_address. 2016-10-28 11:38:49 -04:00
Zach Wernberg 6c994013e2 Corrected TooManyFieldsSent doctring for GET requests. 2016-10-27 18:44:52 -04:00
Jon Dufresne 9b9c8c4a81 Fixed #27368 -- Modifed BaseEmailBackend.__enter__() to close the connection if an exception occurs.
Fixes unclosed socket ResourceWarning in mail test.

Thanks Claude Paroz for the review.
2016-10-21 05:59:07 -07:00
Claude Paroz 1f5b69917d Optimized file copy in TemplateCommand 2016-10-20 16:59:01 +02:00
Tim Graham cd09524f27 Fixed #27200 -- Provided makemigration's allow_migrate() with model_name. 2016-10-13 11:04:58 -04:00
João Sampaio 74a575eb72 Fixed #24607 -- Serialized natural keys in multi-table inheritance models. 2016-10-12 20:04:57 -04:00
Claude Paroz 458e2fbfcc Fixed #27333 -- Prevented BASE64 encoding in message.as_string() on Python 3
Thanks Tim Graham for the review.
2016-10-12 20:48:09 +02:00
Nick Pope f1664a2734 Replaced '__' with LOOKUP_SEP constant. 2016-10-11 11:14:06 -04:00
Claude Paroz 979ea95608 Fixed #27300 -- Made makemigrations --dry-run output a string (no bytes)
Thanks Markus Holtermann for the report and the review.
2016-10-06 11:41:35 +02:00
Lucas Lois e7fa89fb58 Fixed #27262 -- Moved URL checks to resolver and pattern classes.
Thanks Sjoerd Job Postmus for the report and review.
2016-10-05 15:34:26 -04:00
Tim Graham d5c0eb7d68 Removed unused variable in django/core/mail/backends/smtp.py. 2016-10-05 11:16:45 -04:00
Claude Paroz 122c90a43b Fixed #27305 -- Removed BaseCommand.can_import_settings unused attribute
Thanks Tim Graham for the review.
2016-10-02 20:31:56 +02:00
Claude Paroz fa2f55cfd5 Refs #26940 -- Re-allowed makemessages without settings
Thanks Tim Graham for the review.
2016-10-01 14:57:16 +02:00
Claude Paroz fc92c6b500 Removed unneeded no_settings_commands hardcoded list
Thanks Tim Graham for the review.
2016-09-30 17:25:28 +02:00
Vesteinn Snaebjarnarson 602bffe758 Fixed #27210 -- Allowed SMTPBackend to fail silently on a socket connection error. 2016-09-27 14:34:49 -04:00
levental 42dc9d0400 Fixed #26210 -- Prevented SMTP backend from trying to send mail after a connection failure. 2016-09-21 16:45:10 -04:00
Alasdair Nicol 911d9f4ed1 Fixed #27238 -- Disabled check_pattern_startswith_slash if settings.APPEND_SLASH=False.
Thanks strycore for the report and timgraham for suggesting the
solution.
2016-09-19 21:00:12 -04:00
Tim Graham 8119b679eb Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Claude Paroz d389125606 Fixed #27098 -- Deprecated DatabaseIntrospection.get_indexes
Thanks Akshesh <aksheshdoshi@gmail.com> for help with the PostgreSQL query.
Thanks Tim Graham for the review.
2016-09-12 09:26:33 +02:00
Ivan 9a2a52558e Fixed #27171 -- Added unicode_literals and coding preamble to all files in startapp template on Python 2. 2016-09-03 12:00:00 -04:00
Claude Paroz 2ced2f785d Replaced smart_* by force_* calls whenever possible
The smart_* version should only be used when a lazy string should keep
its lazy status.
2016-09-03 13:46:41 +02:00
Ed Morley f02dbbe1ae Fixed #11331 -- Stopped closing pylibmc connections after each request.
libmemcached manages its own connections, so isn't affected by refs #5133.
2016-09-02 14:44:27 -04:00
Tim Graham 098c07a032 Fixed #27142, #27110 -- Made makemigrations consistency checks respect database routers.
Partially reverted refs #27054 except for one of the tests as this
solution supersedes that one.

Thanks Shai Berger for the review.
2016-09-01 16:19:29 -04:00
Riccardo Magliocchetti 7ed8b98f42 Clarified URL regex check message with respect to include(). 2016-09-01 14:06:45 -04:00
Ed Morley d8ef5b0e65 Fixed #27152 -- Supported comma delimiter in memcached LOCATION string. 2016-08-31 17:23:41 -04:00
Ed Morley 65ec8fa8ca Fixed #20892 -- Allowed configuring memcached client using OPTIONS.
Previously, the MemcachedCache backend ignored `OPTIONS` and
PyLibMCCache used them to set pylibmc behaviors. Both backends now
pass `OPTIONS` as keyword arguments to the client constructors.
2016-08-31 12:50:14 -04:00
Claude Paroz fe252c0a5a Fixed #27131 -- Passed proper string type to SMTP connection login
Passing an Unicode string on Python 2 was crashing the connection.
Thanks slavugan@gmail.com for the report, and Tim Graham for the review.
2016-08-31 09:00:41 +02:00
Berker Peksag a02b5848ae Replaced property() usage with decorator in several places. 2016-08-25 20:06:22 -04:00
Tim Graham a3abbe1fcb Removed a blank line per isort. 2016-08-24 13:58:57 -04:00
Simon Charette d5c4ea5246 Fixed #27100 -- Included already applied migration changes in the pre-migrate state.
Refs #24100.

Thanks Tim for the review.
2016-08-24 01:17:48 -04:00
Simon Charette d1757d8df4 Fixed #27044 -- Included already applied migration changes in the post-migrate state when the execution plan is empty.
Refs #24100.

Thanks tkhyn for the report and Tim for the review.
2016-08-24 01:17:18 -04:00
Claude Paroz 48c34f3336 Fixed #26971 -- Prevented crash with non-UTF-8 incoming PATH_INFO
Thanks Tim Graham and Loïc Bistuer for the reviews.
2016-08-23 22:40:07 +02:00
Tim Graham 1d1e246db6 Removed DateTimeAwareJSONEncoder alias. 2016-08-19 15:00:16 -04:00
Adam Chainz 19e20a2a3f Fixed crash comparing CheckMessage objects to non-CheckMessage objects. 2016-08-16 17:17:34 -04:00
Michael Schwarz 72d541b61c Fixed #27007 -- Handled non-UTF-8 bytes objects for text/* attachments.
The fallback logic which allows non-UTF-8 encoded files to be passed to
attach_file() even when a `text/*` mime type has been specified is
moved to attach(). Both functions now fall back to a content type of
`application/octet-stream`.

A side effect is that a file's content is decoded in memory instead of
opening it in text mode and reading it into a string.

Some mimetype-related logic in _create_attachment() has become
obsolete as the code moved from attach_file() to attach() already
handles this.
2016-08-12 16:35:09 -04:00
Claude Paroz 5fb22b4d4c Fixed #27034 -- Made makemessages independent of USE_I18N
Thanks Tim Graham for the review.
2016-08-11 21:16:19 +02:00
Ed Morley 7399fee6c3 Refs #26947 -- Added a deployment system check for SECURE_HSTS_PRELOAD. 2016-08-10 20:31:01 -04:00
Antoine Fontaine 004ba05bca Fixed #27036 -- Made locmem email backend's send_messages() accept generators. 2016-08-08 20:13:29 -04:00
Claude Paroz a6baada7bd Fixed #26940 -- Removed makemessages from no_settings_commands whitelist
As makemessages uses several settings for proper run (FILE_CHARSET,
LOCALE_PATHS, MEDIA_ROOT, and STATIC_ROOT), we should require settings
configuration for this command.
2016-08-08 19:52:57 +02:00
Johannes Dollinger 46509cf13d Moved EmpytResultSet to django.core.exceptions.
This removes the need for some inner imports.
2016-08-08 10:43:34 -04:00
Peter Inglesby e139ef5741 Fixed #27023 -- Prevented possibility of shell loading ~/.pythonrc.py twice. 2016-08-05 12:09:45 -04:00
Tim Graham ccd5a23fba Fixed #27000 -- Removed BaseCommand.usage() per deprecation timeline (refs #19973). 2016-08-02 18:50:12 -04:00
Tim Graham aad46c3e37 Fixed #26930 -- Prevented makemigrations from accessing an empty database.
Thanks Liz Lemon for the report and investigation and
Claude Paroz for the test.
2016-08-01 07:57:12 -04:00
Tomas Pazderka b820b6108a Fixed #26896 -- Allowed a lazy base_url for FileSystemStorage. 2016-07-29 14:13:54 -04:00
Alex Hill 44a6b40280 Fixed #26915 -- Fixed regression handling responses returned from view middleware. 2016-07-25 13:41:50 -04:00
Claude Paroz 599393172b Fixed #26826 -- Stripped spaces from dumpdata pks arguments
Thanks Kevin Graham Foster for the report and Tim Graham for the review.
2016-07-16 20:49:10 +02:00
Claude Paroz 3e71f6544f Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names
Thanks Tim Graham for the review.
2016-07-14 20:37:56 +02:00
Will Hardy 8ef78b8165 Fixed #26656 -- Added duration (timedelta) support to DjangoJSONEncoder. 2016-07-14 13:34:15 -04:00
Dmitry S..ky / skype: dvska-at-skype 82be474efa Fixed #26792 -- Allowed None for the value of cache.get_or_set(). 2016-07-11 20:49:27 -04:00
Claude Paroz 04b7b28812 Fixed #26802 -- Prevented crash when attaching bytes as text message
Thanks Tim Graham for the review.
2016-07-08 11:58:05 +02:00
Berker Peksag 12b4280444 Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension. 2016-06-30 09:08:50 -04:00
Christopher Grebs a9e188ccd6 Fixed #26119 -- Fixed URLValidator crash on URLs with brackets. 2016-06-28 15:43:43 -04:00
Berker Peksag c1b6f554e4 Fixed #15091 -- Allowed passing custom encoder to JSON serializer. 2016-06-28 11:10:07 -04:00
Tim Graham 7e303d15c3 Refs #12594 -- Removed obsolete exception handling in handle_uncaught_exception().
Since 859fc020a7, this is no longer needed.
2016-06-24 09:27:47 -04:00
Claude Paroz 742ea51413 Refs #24829 -- Made TemplateResponse.content available sooner in exception context
Thanks Tim Graham for the initial patch.
2016-06-24 10:22:30 +02:00
Tim Graham 81cdcb66bc Fixed #26791 -- Replaced LiveServerTestCase port ranges with binding to port 0. 2016-06-23 12:04:05 -04:00
Tim Graham cd217de610 Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."
This reverts commit 1b407050dd as it
introduces a regression in the test for refs #26772.
2016-06-18 11:06:56 -04:00
Carl Meyer 7d1b69dbe7 Refs #26601 -- Improved backwards-compatibility of DEP 5 middleware exception handling. 2016-06-17 10:00:39 -07:00
Tim Graham ea34426ae7 Fixed flake8 2.6 warnings. 2016-06-16 09:12:50 -04:00
Ville Skyttä 96f97691ad Fixed broken links in docs and comments. 2016-06-15 21:20:23 -04:00
Hugo Osvaldo Barrera 1b407050dd Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File.
914c72be2a introduced a regression that
causes saving a NamedTemporaryFile in a FileField to raise a
SuspiciousFileOperation. To remedy this, if a File has an absolute
path as a filename, use only the basename as the filename.
2016-06-14 09:28:08 -04:00
Jon Dufresne cd88faa628 Removed unnecessary check in TemporaryUploadedFile.
If settings.FILE_UPLOAD_TEMP_DIR is the default value of None,
NamedTemporaryFile will work the same as if nothing was passed.
2016-06-11 20:45:11 -04:00
Berker Peksag ae2a7da86b Fixed #20468 -- Added loaddata --exclude option.
Thanks Alex Morozov for the initial patch.
2016-06-09 10:35:32 -04:00
Emad Mokhtar c4980e28e5 Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results. 2016-06-08 14:09:24 -04:00
Berker Peksag 724dd2043e Fixed #26717 -- Added Serializer.stream_class to customize the stream. 2016-06-08 11:08:18 -04:00
Anton I. Sipos c3495bb984 Fixed #12666 -- Added EMAIL_USE_LOCALTIME setting.
When EMAIL_USE_LOCALTIME=True, send emails with a Date header
in the local time zone.
2016-06-04 09:55:50 -04:00
Jon Dufresne 779829662d Fixed #26694 -- Made FileBasedCache.get() reraise non-ENOENT IOErrors. 2016-06-01 15:29:24 -04:00
Jon Dufresne 359be1c870 Fixed #26691 -- Removed checking for a file's existence before deleting.
File operations always raise a ENOENT error when a file doesn't exist.
Checking the file exists before the operation adds a race condition
condition where the file could be removed between operations. As the
operation already raises an error on a missing file, avoid this race and
avoid checking the file exists twice. Instead only check a file exists
by catching the ENOENT error.
2016-05-31 12:03:27 -04:00
Simon Charette 4f474607de
Fixed #26646 -- Added IOBase methods required by TextIOWrapper to File.
Thanks Tim for the review.
2016-05-27 21:05:58 -04:00
Ramiro Morales 6ab0d1358f Fixed #26645 -- Fixed potential makemessages failures on Windows.
This was reflected by 27 i18n test errors (not failures) on such
platform caused by corrupt intermediate PO catalog files fed to
`msgmerge(1)`.

Made it handle in-memory PO/POT file contents with normalized line
separators (`'\n'`).

We need to perform manually this after using `subprocess.Popen` as we
can't pass it `universal_newlines=True`.

Also fixes #26670 in the process as this commit refactors the same code
section.
2016-05-27 21:02:14 -03:00
Alex Hill 779bb82f51 Fixed #26421 -- Refactored ModelSignal to use Apps.lazy_model_operation() 2016-05-19 21:33:36 -04:00
Alex Hill 2ff7ef15b0 Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests 2016-05-19 21:33:36 -04:00
Tim Graham 354acd04af Refs #26601 -- Added a warning if both MIDDLEWARE AND MIDDLEWARE_CLASSES are set. 2016-05-17 07:24:45 -04:00
Tim Graham ece4d24f8e Refs #26601 -- Deprecated old-style middleware. 2016-05-17 07:22:26 -04:00
Florian Apolloner 9baf692a58 Fixed #26601 -- Improved middleware per DEP 0005.
Thanks Tim Graham for polishing the patch, updating the tests, and
writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-17 07:22:22 -04:00
Florian Apolloner 05c888ffb8 Refs #26601 -- Refactored BaseHandler to prepare for new-style middleware. 2016-05-17 07:20:56 -04:00
Simon Charette f937c9ec97 Fixed #24100 -- Made the migration signals dispatch its plan and apps.
Thanks Markus for your contribution and Tim for your review.
2016-05-15 19:51:15 -04:00
Andre Cruz 929684d6ee Fixed #21231 -- Enforced a max size for GET/POST values read into memory.
Thanks Tom Christie for review.
2016-05-12 10:17:52 -04:00
Raphael Gaschignard 8f6a1a1551 Fixed #26429 -- Added a timestamp to merge migration names.
This reduces the possibility of a naming conflict, especially after
squashing migrations.
2016-05-11 08:19:19 -04:00
Vasiliy Faronov 31e0314979 Fixed #26580 -- Updated references to obsolete RFC 2822.
Didn't rename django.utils.feedgenerator.rfc2822_date()
as some external code may rely on it.
2016-05-10 11:24:51 -04:00
Jarek Glowacki c8df17b612 Included reverse deps in showmigrations 2016-05-08 13:53:36 +02:00
Sergei Maertens ec009ef1d8 Fixed #25986 -- Fixed crash sending email with non-ASCII in local part of the address.
On Python 3, sending emails failed for addresses containing non-ASCII
characters due to the usage of the legacy Python email.utils.formataddr()
function. This is fixed by using the proper Address object on Python 3.
2016-05-06 14:34:11 -04:00
Claude Paroz 3204bc8e5e Replaced a 'raw' six import 2016-05-04 20:59:52 +02:00
Claude Paroz 4731e9d82e Fixed #26341 (again) -- Addressed multiple occurrences per line use case 2016-05-02 19:39:56 +02:00
Offby-One Kenobi f2b2a35699 Fixed docstring typos. 2016-05-02 11:43:03 -04:00
Alasdair Nicol eb5d7bc2f4 Fixed #26440 -- Added a warning for non-url()s in urlpatterns.
Thanks Burhan Khalid for the initial patch and knbk/timgraham
for review.
2016-04-30 20:09:31 -04:00
Cristiano 914c72be2a Fixed #26058 -- Delegated os.path bits of FileField's filename generation to the Storage. 2016-04-30 17:22:40 -04:00
Claude Paroz b16b124996 Fixed #26341 -- Fixed makemessages breaking location comments for HTML files
Thanks Sylvain Garancher for the report and Veranika Sabiashchanskaya for the
initial patch.
2016-04-30 12:08:20 +02:00
Anssi Kääriäinen 7f51876f99 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 2016-04-29 13:06:32 -04:00
David Evans 2fcafd169b Fixed #26546 -- Allowed HTTPStatus enum values for HttpResponse.status. 2016-04-29 10:55:01 -04:00
Tim Graham bb0b4b705b Fixed #26052 -- Moved conditional_content_removal() processing to the test client. 2016-04-25 07:56:07 -04:00
Maxim Novikov 4d1c229ee5 Fixed #26495 -- Added name arg to Storage.save()'s File wrapping. 2016-04-21 10:40:48 -04:00
Carl Worth 40b69607c7 Fixed #26504 -- Avoided logging "Not Found" warnings if a middleware handles the 404.
For example, this avoids a warning in the case of a request that's
redirected to a language-prefixed URL by LocaleMiddleware.
2016-04-20 21:02:05 -04:00
Claude Paroz 836d475afe Fixed #22561 -- Prevented too long lines in email messages
Thanks NotSqrt for the excellent report and Tim Graham for the review.
2016-04-19 09:35:24 +02:00
Claude Paroz 79a091820f Converted property syntax in django.core.paginator 2016-04-15 17:16:55 +02:00
Berker Peksag 93deb1691e Fixed #26492 -- Fixed "maximum recursion depth exceeded" migrate error.
A regression introduced in 0d3c616fbb2f49fa7ff6809e5a6777275352b35b;
refs #26351.
2016-04-12 09:04:14 -04:00
Claude Paroz 0d3c616fbb Refs #26351 -- Added check hook to support database-related checks
Thanks Tim Graham and Shai Berger for the reviews.
2016-04-08 20:28:00 +02:00
Tim Graham df8d8d4292 Fixed E128 flake8 warnings in django/. 2016-04-08 09:51:06 -04:00
Przemysław Suliga 90ce5d46bf Fixed #26462 -- Fixed Python 2 UnicodeEncodeError when warning about long cache keys. 2016-04-05 11:16:04 -04:00
Attila Tovt 02ae5fd31a Fixed #25850 -- Made migrate/makemigrations error on inconsistent history. 2016-04-05 08:52:08 -04:00
Tim Graham 2cd2d18851 Fixed W503 flake8 warnings. 2016-04-04 17:14:26 -04:00
Przemysław Suliga d356bb653f Fixed #26460 -- Issued a single warning for invalid cache key 2016-04-04 15:20:55 -04:00
David Evans 99bb7fcc18 Fixed #26452 -- Loaded middleware on server start rather than on first request. 2016-04-04 10:12:41 -04:00
rixx fdf5cd3429 Fixed #25905 -- Prevented leading slashes in urljoin() calls
Leading slashes in the second urljoin argument will return exactly that

argument, breaking FileSystemStorage.url behavior if called with a

parameter with leading slashes.

Also added test cases for null bytes and None. Thanks to Markus for

help and review.
2016-04-03 17:21:56 +02:00
Dunedan 9378229c5e Merge pull request #6389 from Dunedan/ticket_25420
Fixed #25420 -- Documented bash completion exit code behavior.
2016-04-03 11:52:57 +02:00
Vincenzo Pandolfo abf07355aa Fixed #26365 -- Added a system check to ensure "string_is_invalid" is a string. 2016-03-21 13:01:38 -04:00
José Tomás Tocino 39a16dd2e0 Fixed #25658 -- Allowed inspectdb to inspect a specific set of tables. 2016-03-18 08:41:15 -04:00
Przemysław Suliga 96ec67a7cf Fixed #26332 -- Fixed a race condition in BaseCache.get_or_set(). 2016-03-08 11:44:37 -05:00
Saúl Ibarra Corretgé 6c33e73333 Fixed #26289 -- Enabled shell tab completion on systems using libedit. 2016-03-08 08:37:14 -05:00
Jon Dufresne 1845bc1d10 Refs #26315 -- Cleaned up argparse options in commands.
* Removed type coercion. Options created by argparse are already coerced
  to the correct type.
* Removed fallback default values. Options created by argparse already
  have a default value.
* Used direct indexing. Options created by argparse are always set. This
  eliminates the need to use dict.get().
2016-03-05 13:19:29 -05:00
Jon Dufresne 4115288b4f Fixed #26315 -- Allowed call_command() to accept a Command object as the first argument. 2016-03-05 13:05:10 -05:00
Jon Dufresne 8d3fcfa39e Cleaned up tests to use call_command() instead of Command.execute(). 2016-03-05 12:59:30 -05:00
Jon Dufresne 394b7f90d3 Passed proper default value to int-type 'verbosity' option 2016-03-03 20:42:43 +01:00
Jon Dufresne fb3540d6a4 Removed obsolete, unused option 'hide_empty' from loaddata command.
Unused since 67235fd4ef.
2016-03-01 19:48:32 -05:00
Claude Paroz 4c18a8a378 Fixed #14098 -- Prevented crash for introspection errors in inspectdb
Thanks Tim Graham for the review.
2016-02-25 08:43:56 +01:00
James Aylett 1ff6e37de4 Fixed #23832 -- Added timezone aware Storage API.
New Storage.get_{accessed,created,modified}_time() methods convert the
naive time from now-deprecated {accessed,created_modified}_time()
methods into aware objects in UTC if USE_TZ=True.
2016-02-23 18:51:43 -05:00
Claude Paroz b46c0ea6c8 Fixed #26190 -- Returned handle() result from call_command
Thanks Tim Graham for the review.
2016-02-23 09:12:12 +01:00
Tim Graham b1afebf882 Fixed #26204 -- Reallowed dashes in top-level domains for URLValidator.
Thanks Shai Berger for the review.
2016-02-18 19:06:49 -05:00
Akshesh d58aaa24e3 Fixed #26107 -- Added option to int_list_validator() to allow negative integers. 2016-02-18 18:58:18 -05:00
Mounir Messelmeni 50931dfa53 Fixed #25304 -- Allowed management commands to check if migrations are applied. 2016-02-12 13:34:56 -05:00
Tim Graham 004ba0f99e Removed unneeded hint=None/obj=None in system check messages. 2016-02-12 13:01:25 -05:00
Roberto Rosario 408c406abc Added a function for SECRET_KEY generation logic. 2016-02-11 08:07:59 -05:00
Curtis Maloney 6f1318734f Fixed #26014 -- Added WSGIRequest content_type and content_params attributes.
Parsed the CONTENT_TYPE header once and recorded it on the request.
2016-02-10 18:19:23 -05:00
Simon Charette 275314512d Refs #26144 -- Used proxy_for_model instead of mro inspection. 2016-02-05 12:14:32 -05:00
Pankrat f91a04621e Fixed #25833 -- Added support for non-atomic migrations.
Added the Migration.atomic attribute which can be set to False
for non-atomic migrations.
2016-02-05 09:09:05 -05:00
Yoong Kang Lim 0edb8a146f Fixed #26144 -- Warned when dumping proxy model without concrete parent. 2016-02-04 19:40:12 -05:00
Simon Charette d7db417f1a Removed some leftover trailing commas. 2016-02-04 12:23:13 -05:00
Buddy Lindsey, Jr 731bdfe68a Fixed #26155 -- Skipped URL checks if no ROOTURL_CONF setting. 2016-02-01 13:51:38 -05:00
Markus Holtermann 4b0118465b Fixed #26150 -- Sorted app_labels in migrate command output 2016-01-29 10:26:04 +11:00
userimack 60586dd737 Fixed #26125 -- Fixed E731 flake warnings. 2016-01-25 14:23:43 -05:00
Chris Lamb abc0777b63 Fixed #25968 -- Changed project/app templates to use a "py-tpl" suffix.
Debian packages unconditionally byte-compile .py files on installation and
do not silence errors by design. Therefore, we need a way of shipping these
invalid .py files without a .py extension but ensuring that when we
template them, they end up as .py.

We don't special-case .py files so that the all the TemplateCommand
command-line options (eg. extra_files and extensions) still work entirely
as expected and it may even be useful for other formats too.
2016-01-25 12:39:06 -05:00
Tim Graham e519aab43a Fixed #23868 -- Added support for non-unique django-admin-options in docs.
Also documented missing short command line options to fix #24134. This bumps
the minimum sphinx version required to build the docs to 1.3.4.

Thanks Simon Charette for review.
2016-01-14 18:21:33 -05:00
Tim Graham 5b94b17fef Fixed #25999 -- Removed promotion of RemovedInNextVersionWarning to loud by default. 2016-01-14 09:05:43 -05:00
Flavio Curella 0bc5cd6280 Fixed #25684 -- Made runserver use logging for request/response output.
Thanks andreif for the contributing to the patch.
2016-01-11 07:35:17 -05:00
Simon Charette 56c461a0d7 Fixed #26038 -- Changed FileSystemStorage defaults on setting change.
Thanks to Dave Voutila for the report and Tim for the review.
2016-01-07 12:04:39 -05:00
Simon Charette a08fda2111 Fixed #25746 -- Isolated inlined test models registration.
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
Niels Van Och 7f7553dd30 Fixed #25680 -- Added django-admin shell --command option.
Add a -c option to the shell command to execute a command passed as a
string as Django.
2016-01-06 18:43:41 -05:00
Andrew Kuchev d5b90c8e12 Fixed #21549 -- Made loaddata's 'fixture not found' warning an exception.
Thanks to mpasternak for the report and Tim Graham for the review.
2016-01-04 19:39:35 -05:00
Marten Kenbeek 16411b8400 Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Marten Kenbeek c87540cee5 Fixed #26011 -- Prevented random LiveServerTestCase test failures on Windows.
Prevented LiveServerTestCase from stealing ports used by concurrent
processes on Windows.
2015-12-31 10:57:03 -05:00
Anssi Kääriäinen ee9f4686b1 Fixed #23372 -- Made loaddata faster if it doesn't find any fixtures.
Django's test suite often tries to load fixture files from apps that have
no fixtures at all. This creates a lot of unnecessary disabling and
enabling of constraints which can be expensive on some database.

To speed this up, loaddata now first checks if any fixture file matches.
If no fixture file is matched, then the command exits before disabling
and enabling of constraints is done.

The main benefit of this change is seen on MSSQL, where tests on
Django 1.8 run hours faster.
2015-12-31 09:00:44 -05:00
Matthew Madurski 7df9aa3a33 Fixed typo in BaseCache.delete_many() docstring. 2015-12-29 20:50:04 -05:00
Jon Dufresne f1628f6be1 Fixed #25838 -- Added "python" as an interface to the shell command.
Deprecates the "--plain" option.
2015-12-22 08:22:12 -05:00
Tim Graham b10f66831b Fixed #25958 -- Removed support for 'skip_validation' in BaseCommand.execute(**options). 2015-12-21 14:26:42 -05:00
Emre Yilmaz 63a6a653d4 Fixed #25855 -- Enhanced the migration warning for runserver.
Added unapplied migration count and the list of unmigrated apps.
2015-12-21 12:54:29 -05:00
Niels Van Och 99a1265a39 Fixed #25063 -- Added path to makemigration's output of migration file. 2015-12-18 11:20:00 -05:00
Raphael Michel 82976e5c3f Fixed #25637 -- Added URLValidator hostname length validation.
URLValidator now validates the maximum length of a hostname and the
maximum length of all labels inside the hostname.
2015-12-08 15:46:45 -05:00
Emre Yilmaz 8e838d9c86 Fixed #25840 -- Fixed BaseCache.get_or_set() on the DummyCache backend.
This also fixes a possible data eviction race condition between
setting and getting a key. Another thread could remove the key
before get_and_set() accesses it again. In this case, now the
default value will be returned instead of None.
2015-12-04 12:22:17 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Jacek Bzdak 2cb50f935a Fixed #25274 --- Made inspectdb handle renamed fields in unique_together. 2015-11-25 13:07:00 -05:00
Attila Tovt 8092745593 Fixed #25779 -- Removed redundant try block in WSGIHandler 2015-11-20 16:12:17 +02:00
Claude Paroz fa08d27fb7 Fixed #25677 -- Prevented decoding errors in/after Popen calls
Thanks Gavin Wahl for the report and Tim Graham for the review.
2015-11-19 15:17:47 +01:00
Tim Graham c7adfe941b Removed redundant termcolors.
Replaced MIGRATE_SUCCESS and MIGRATE_FAILURE with
SUCCESS and ERROR.
2015-11-18 10:26:39 -05:00
Attila Tovt 0a2d3b7387 Fixed #25682 -- Removed bare except clauses. 2015-11-17 14:39:15 -05:00
Dmitry Dygalo 92eced62cd Simplified lists creation in three places. 2015-11-17 07:58:49 -05:00
Jaap Roes 1aba0e4c68 Refs #25501 -- Fixed a typo in django/core/cache/backends/filebased.py
The original intent in refs #20536 was to use the highest protocol.
Calling zlib.compress() with a compression level of -1 seems to
fall back to the default level of 6.
2015-11-14 15:10:14 -05:00
Baptiste Mispelon 9bc0c21b1c Made BaseCommand.get_version() docstring consistent with docs. 2015-11-14 07:58:58 -05:00
Ville Skyttä 3ee18400ae Fixed #25668 -- Misc spelling errors 2015-11-03 11:58:13 +02:00
Dheerendra Rathor 06627ef2ca Fixed #25635 -- Made URLValidator allow '+' in scheme. 2015-10-31 17:50:05 -04:00
Claude Paroz 7d81ee6efc Fixed #16734 -- Set script prefix even outside of requests
Thanks Tim Graham for the review.
2015-10-29 20:12:38 +01:00
Dheerendra Rathor 96fe90f535 Fixed #25620 -- Made URLValidator prohibit URLs with consecutive dots in the domain section. 2015-10-29 10:59:22 -04:00
Claude Paroz ea2f48ce8b Refs #17133 -- Optimized script_url handling in get_script_name
10ace52a added some regex processing for each request with SCRIPT_URL set.
In a speed critical section, conditionally apply of the regex will save some
resources.
2015-10-27 14:29:18 +01:00
Tim Graham 9c5e272860 Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set. 2015-10-27 07:57:15 -04:00
Jon Dufresne 5d35b53c36 Removed hardcoded utf-8 BOM, used value from codecs instead. 2015-10-25 09:28:11 -07:00
Jon Dufresne 3c7d2ee881 Fixed #25604 -- Added makemigrations --check option.
Command exits with non-zero status if changes without migrations exist.
2015-10-24 14:45:00 -04:00
Andrey Kuzmin a1b9737aea Cached model field_names in Python Deserializer. 2015-10-23 16:23:30 -04:00
Claude Paroz 10ace52a41 Fixed #17133 -- Properly handled successive slashes in incoming requests
Thanks gjanee@ucop.edu for the report and Tim Graham for the review.
2015-10-23 22:18:18 +02:00
Tim Graham 37ea3cb03e Fixed "URLconf" spelling in code comments. 2015-10-22 14:46:42 -04:00
Yoong Kang Lim 3f300efede Fixed #25589 -- Allowed startapp/project to create apps with Unicode characters in the name. 2015-10-22 13:01:07 -04:00
Andrew Artajos 48888a1a67 Fixed #25501 -- Made the file-based cache backend use the highest pickling protocol. 2015-10-20 13:05:33 -04:00
Aymeric Augustin df0a446fd4 Fixed #25510 -- Allowed runserver to start with incorrect INSTALLED_APPS.
In that case, the content of INSTALLED_APPS will be ignored until it's
fixed and the autoreloader kicks in. I confirmed this behavior manually.
As explained on the ticket it's hard to write a test for this case
2015-10-18 10:34:04 +02:00
Jon Dufresne 2875325889 Fixed #25500 -- Added --fail-level option to check command.
This option specifies the level that check command exits with a
non-zero status. Default is ``ERROR``.
2015-10-05 17:11:40 -04:00
Claude Paroz 3f22e83e90 Fixed #25483 -- Allowed passing non-string arguments to call_command
Thanks KS Chan for the report and Tim Graham for the review.
2015-10-03 14:40:33 +02:00
Claude Paroz b7ade64529 Fixed #25468 -- Made DjangoJSONEncoder lazy string aware
Thanks Stavros Korokithakis for the report and Tim Graham for the
review.
2015-09-27 22:37:27 +02:00
Tim Graham e6cfa08f2d Refs #22804 -- Made an unsafe value of 'sep' in Signer an exception.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham 2a20ebe6a5 Removed deprecated TEMPLATE_* settings per deprecation timeline. 2015-09-23 19:31:11 -04:00
Tim Graham 54fd769eb4 Removed django.core.context_processors per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham b4002a2143 Refs #22835 -- Removed NoArgsCommand per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham b6e6fcf326 Refs #23359 -- Removed the migrate --list option per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 1bb6ecf6d3 Refs #9893 -- Removed shims for lack of max_length support in file storage per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 6a70cb5397 Refs #19973 -- Removed optparse support in management commands per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 785cc71d5b Refs #22384 -- Removed the ability to reverse URLs by dotted path per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham a25d3ce007 Refs #22218 -- Removed conf.urls.patterns() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 04ee4059d7 Refs #24022 -- Removed the ssi tag per deprecation timeline. 2015-09-23 19:31:09 -04:00
Alasdair Nicol f2975c021d Refs #23813 -- Moved URLconfs into module and tidied docstrings. 2015-09-21 20:10:33 -04:00
Matt Deacalion Stevens c07f9fef39 Corrected docstring in core.urlresolvers module.
The RegexURLResolver.resolve() method no longer returns a tuple.
It has returned a ResolverMatch object since commit e0fb90b2.
2015-09-21 13:59:17 -04:00
Alasdair Nicol fe3fc5210f Fixed #23813 -- Added checks for common URL pattern errors
Thanks jwa and lamby for the suggestions, and timgraham and jarshwah
for their reviews.
2015-09-21 23:46:21 +10:00
Markus Holtermann 43f2eb7ef3 Fixed #25390 -- Allowed specifying a start migration in squashmigrations
Thanks Tim Graham for the review.
2015-09-19 14:55:34 +10:00
Iulia Chiriac 75ed590032 Fixed #24636 -- Added model field validation for decimal places and max digits. 2015-09-18 14:30:20 -04:00
Tom Christie b02f08e02c Fixed #25034 -- Converted caches ImproperlyConfigured error to a system check. 2015-09-18 07:44:39 -04:00
Matthew Crowson 8615e41586 Fixed typo in django/core/cache/backends/base.py docstring. 2015-09-16 09:29:56 -04:00
Daniel Hahler d731cf5caf Added upgrade tip in BaseCommand.option_list deprecation comment. 2015-09-15 12:06:29 -04:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Aymeric Augustin 326bc0955b Allowed a port range for the liveserver by default.
This is required for running tests in parallel.
2015-09-09 23:01:16 +02:00
Daniel Hahler acb833081d Fixed #25372 -- Fixed autocompletion for options of non-argparse commands. 2015-09-09 14:51:41 -04:00
Raphael Michel 1bbca7961c Fixed #25350 -- Added alias --no-input for --noinput to management commands. 2015-09-08 08:41:03 -04:00
Tim Graham 721d8e50ac Fixed #25144 -- Allowed migrate to create tables for apps without migrations. 2015-09-04 09:47:30 -04:00
Maxime Lorant 5153a3bfdc Fixed #25331 -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Aymeric Augustin fe6ddb837d Fixed #24704 -- Made the autoreloader survive SyntaxErrors.
With this change, it's expected to survive anything except errors
that make it impossible to import the settings. It's too complex
to fallback to a sensible behavior with a broken settings module.

Harcoding things about runserver in ManagementUtility.execute is
atrocious but it's the only way out of the chicken'n'egg problem:
the current implementation of the autoreloader primarily watches
imported Python modules -- and then a few other things that were
bolted on top of this design -- but we want it to kick in even if
the project contains import-time errors and django.setup() fails.

At some point we should throw away this code and replace it by an
off-the-shelf autoreloader that watches the working directory and
re-runs `django-admin runserver` whenever something changes.
2015-08-29 20:49:56 +02:00
Sergey Kolosov e75882332c Fixed #17375 -- Changed makemessages to use xgettext with --files-from
Changed the way makemessages invokes xgettext from one call per
translatable file to one call per locale directory (using --files-from).
This allows to avoid https://savannah.gnu.org/bugs/index.php?35027 and,
as a positive side effect, speeds up localization build.
2015-08-28 15:41:58 -04:00
Tim Graham 01b2b0b654 Fixed #25318 -- Made SILENCED_SYSTEM_CHECKS suppress all messages.
Previously, messages of ERROR level or higher were printed to
the console.
2015-08-28 13:34:56 -04:00
Jonas Haag 2bb1027d6b Fixed #25322 -- Lazily compiled core.validators regular expressions.
This speeds up import of 'django.core.validators' which can save a
few hundred milliseconds when importing the module for the first
time. It can be a significant speedup to the django-admin command.
2015-08-28 13:05:41 -04:00
Tim Graham 45ed19de68 Fixed #25047 -- Improved "Conflicting migrations" error message. 2015-08-24 08:05:21 -04:00
Claude Paroz c1893e2839 Fixed #25285 -- Provided unknown command message with plain django-admin.py
Thanks Maxime Lorant for the report and Tim Graham for suggesting
the improved comment.
2015-08-19 19:58:44 +02:00
Markus Holtermann 0271a11ba5 Fixed #24755 -- Hid operations from dependency apps when merging migrations
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-08-18 18:33:14 +10:00
mlavin 69db1c7455 Fixed #25231 -- Added recording of squashed migrations in the migrate command.
Ensured squashed migrations are recorded as applied when the
migrate command is run and all of the original migrations
have been previously applied.
2015-08-07 17:59:18 -04:00
Tim Graham 1a76257b1b Fixed #25204 -- Added missing space in runserver logging. 2015-08-01 08:01:24 -04:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Konrad Świat c6da621def Fixed #24623 -- Fixed EmailMessage.attach_file() with text files on Python 3.
Thanks tkrapp for the report and Tim Graham for the review.
2015-07-25 07:42:30 -04:00
Claude Paroz c296e55dc6 Fixed #22258 -- Added progress status for dumpdata when outputting to file
Thanks Gwildor Sok for the report and Tim Graham for the review.
2015-07-24 18:37:55 +02:00
Tim Graham 5cedef9b50 Fixed #25155 -- Removed an inner class in core.management.color for PyPy performance. 2015-07-21 13:07:45 -04:00
Tim Graham 6e3fe089dd Replaced six.BytesIO with io.BytesIO 2015-07-20 08:19:47 -04:00
Edward Henderson f8cc464452 Fixed #16501 -- Added an allow_unicode parameter to SlugField.
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-17 13:48:58 -04:00
rroskam ed514caed2 Fixed #24966 -- Added deployment system check for empty ALLOWED_HOSTS. 2015-07-15 09:18:58 -04:00
Thomas Stephenson 035b0fa60d Fixed #24716 -- Deprecated Field._get_val_from_obj()
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
2015-07-14 09:13:22 -04:00
Cesar Canassa 561c018d88 Fixed #25123 -- Corrected makemessages --extension help text 2015-07-14 07:35:27 -04:00
Daniel Roseman 24620d71f2 Fixed #25079 -- Added warning if both TEMPLATES and TEMPLATE_* settings are defined.
Django ignores the value of the TEMPLATE_* settings if TEMPLATES is also
set, which is confusing for users following older tutorials. This change
adds a system check that warns if any of the TEMPLATE_* settings have
changed from their defaults but the TEMPLATES dict is also non-empty.

Removed the TEMPLATE_DIRS from the test settings file; this was marked
for removal in 1.10 but no tests fail if it is removed now.
2015-07-13 17:50:22 -04:00
Andrei Kulakov db97a88495 Fixed #24375 -- Added Migration.initial attribute
The new attribute is checked when the `migrate --fake-initial` option
is used. initial will be set to True for all initial migrations (this
is particularly useful when initial migrations are split) as well as
for squashed migrations.
2015-07-13 15:57:40 -04:00
Shai Berger 17d3a6d804 Fixed catastrophic backtracking in URLValidator.
Thanks João Silva for reporting the problem and Tim Graham for finding the
problematic RE and for review.

This is a security fix; disclosure to follow shortly.
2015-07-08 15:23:03 -04:00
Tim Graham 014247ad19 Prevented newlines from being accepted in some validators.
This is a security fix; disclosure to follow shortly.

Thanks to Sjoerd Job Postmus for the report and draft patch.
2015-07-08 15:23:03 -04:00
David Wolever 0d71349773 Fixed #22804 -- Added warning for unsafe value of 'sep' in Signer
Thanks Jaap Roes for completing the patch.
2015-07-07 11:44:37 -04:00
Alexey Sveshnikov bc98bc56a5 Fixed #25059 -- Allowed Punycode TLDs in URLValidator 2015-07-06 15:08:43 -04:00
Karol Duleba b74b94445d Updated Memcached get_backend_timeout() comment. 2015-07-06 10:13:20 -04:00
Sylvain Fankhauser f5d5867a4a Fixed #24877 -- Added middleware handling of response.render() errors. 2015-07-03 12:06:40 -04:00
Rigel Di Scala b91a2a499f Fixed #23190 -- Made Paginator.page_range an iterator 2015-07-03 11:34:34 -04:00