Matthew Somerville
40f0a84cb1
Fixed #24159 -- Made compilemessages run across all apps.
...
Updated the command to match the documentation, which states it
runs over all .po files.
2015-06-04 21:02:02 -04:00
Peter Inglesby
0688a7946a
Fixed #24776 -- Improved apps.get_app_config() error message on fully-qualified package names.
2015-05-22 11:08:25 -04:00
Claude Paroz
7b027c463e
Fixed #24805 -- Delayed check for locale_dir in makemessages
...
Thanks Wim Feijen for the report.
2015-05-18 14:12:49 +02:00
Aymeric Augustin
e2a652fac1
Refactored datetime handling in the database cache backend.
...
Took advantage of the new database adapters and converters.
2015-05-17 09:40:33 +02:00
Aymeric Augustin
54026f1e8d
Renamed value_to_db_xxx to adapt_xxxfield_value.
...
This mirrors convert_xxxfield_value nicely, taking advantage of the
adapter/converter terminology which is commonly used by DB-API modules.
2015-05-17 09:39:34 +02:00
Aymeric Augustin
ec186572e6
Removed global timezone-aware datetime converters.
...
Refs #23820 .
2015-05-17 09:36:23 +02:00
Piotr Jakimiak
4157c502a5
Removed unnecessary arguments in .get method calls
2015-05-13 20:51:18 +02:00
Claude Paroz
f61c4f490d
Fixed #24742 -- Made runserver.check_migrations ignore read-only databases
...
Thanks Luis Del Giudice for the report, and Aymeric Augustin and Markus
Holtermann for the reviews.
2015-05-13 18:30:36 +02:00
Matt Robenolt
0d7a295f28
Allowed runserver sublcasses to easily override the default port.
2015-05-12 08:51:29 -04:00
Claude Paroz
70779d9c1c
Fixed #24733 -- Passed the triggering exception to 40x error handlers
...
Thanks Tim Graham for the review.
2015-05-11 22:02:14 +02:00
Claude Paroz
69125ce904
Extended variable name in handlers/base.py
...
Refs #24733 .
2015-05-05 10:58:27 +02:00
Luis Del Giudice
69ddc1b3da
Fixed #24693 -- Added label and label_lower property to Model._meta
2015-05-02 16:58:18 +02:00
daphshez
57202a112a
Fixed #23271 -- Fixed makemessages crash/test failure for some locales.
2015-05-01 10:27:28 -04:00
Harry
40768ec29d
Fixed #24707 -- Improved error reporting for explicitly imported uncallable views
2015-04-26 19:19:15 +02:00
Marten Kenbeek
1521861b3c
Fixed #24703 -- Changed squashmigrations to use a MigrationLoader
...
Changed squashmigrations to not instantiate a MigrationExecutor,
but to directly use a MigrationLoader instance instead.
2015-04-25 17:41:17 +02:00
David Danier
9346e45f84
Fixed #24664 -- Removed misleading arg name from TemporaryFileUploadHandler.new_file
2015-04-20 11:59:30 +02:00
Claude Paroz
8097e54832
Fixed #23879 -- Allowed model migration skip based on feature/vendor
...
Thanks Carl Meyer for the report and review, and Tim Graham for the
review.
2015-04-18 15:17:49 +02:00
Anoop Thomas Mathew
2400329508
Fixed #24349 -- Limited domain name labels to 63 characters in EmailValidator
2015-04-17 18:08:33 -04:00
Yitzhak Clark
188a241880
Fixed #21652 -- Added notification when processing objects in loaddata
...
Added a running count of the objects processed by loaddata when
verbosity >= 3.
2015-04-16 09:42:18 -04:00
Joe Borg
503bbc49d8
Added missing periods in migrate help messages.
2015-04-14 08:10:16 -04:00
Adam Chainz
5564d0f2ee
Fixed #24560 -- Added a --dry-run mode to the createcachetable command.
2015-04-09 12:15:50 -04:00
Richard Eames
727e40c879
Fixed #19820 -- Added more helpful error messages to Python deserializer.
2015-04-09 10:56:33 -04:00
Tim Graham
0824c02603
Removed unused exception "as" variable.
2015-04-08 13:09:51 -04:00
steve
2fc19b9238
Fixed #24544 -- Fixed get_image_dimensions() on image buffers that Pillow fails to parse.
...
Thanks Steve Kossouho for the report and original patch.
2015-04-07 19:51:19 -04:00
Claude Paroz
426b63ba04
Fixed #24571 -- Restored testserver positional arguments parsing
...
Thanks Domas Lapinskas for the report and Tim Graham for the
review.
2015-04-04 10:46:29 +02:00
Matt Hooks
2c39f282b8
Fixed typo in django.core.files.File docstring.
2015-04-02 20:38:22 -04:00
Simon Charette
5bc3123479
Fixed #24558 -- Made dumpdata mapping ordering deterministic.
...
Thanks to gfairchild for the report and Claude for the review.
2015-04-02 15:21:43 -04:00
Claude Paroz
a2e56db8a7
Removed unused import in makemessages
2015-04-01 20:01:12 +02:00
Claude Paroz
3f4e778402
Refs #24500 -- Avoided locale.getpreferredencoding in makemessages
...
Fixes a regression introduced in 53c2cf1e
.
2015-04-01 19:57:48 +02:00
Bertrand Bordage
3e64f3d0fc
Fixed #24531 -- Improved CommaSeparatedIntegerField validation.
...
`','`, `'1,,1'`, `',1'` etc. are no longer considered as valid
comma-separated integer lists.
2015-03-25 18:49:59 -04:00
Raúl Cumplido
cda74c7fc9
Fixed #24441 -- Changed get_image_dimensions() return value for broken images
2015-03-25 12:39:29 -04:00
Anssi Kääriäinen
8f30556329
Renamed Field.rel attribute to remote_field
...
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
2015-03-25 08:16:12 -04:00
Pakal
53c2cf1e7b
Fixed #24500 -- Fixed makemessages encoding problems retrieving gettext version.
2015-03-21 09:08:51 -04:00
Tim Graham
a3e75f6bed
Removed unused imports.
2015-03-20 17:57:11 -04:00
Claude Paroz
ba37ac749e
Adapted sendtestemail to be more argparse-ish
2015-03-20 20:40:35 +01:00
Loek van Gent
d898ba1bec
Fixed #24419 -- Added sendtestemail management command
2015-03-20 12:03:50 -04:00
Claude Paroz
a0c2eb46dd
Fixed #23960 -- Removed http.fix_location_header
...
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-03-18 18:22:50 +01:00
Bas Peschier
0339844b70
Fixed #24476 -- Added context manager/decorator for overriding script prefix.
...
Tests were using an undocumented keyword argument for easily overriding
script prefix while reversing. This is now changed into a test utility
which can be used as decorator or context manager.
2015-03-18 13:03:25 -04:00
John Giannelos
8758a63ddb
Fixed #24427 -- Stopped writing migration files in dry run mode when merging.
...
Also added display of migration to stdout when verbosity=3.
2015-03-16 14:04:37 -04:00
Berker Peksag
34fb909180
Fixed #12982 -- Added a get_or_set() method to the BaseCache backend.
2015-03-14 20:07:16 +02:00
Claude Paroz
a52cd407b8
Fed tuples to startswith when appropriate
2015-03-13 21:58:28 +01:00
medmunds
5993b52e6d
Fixed #24416 -- Added support for lazy email addresses.
2015-03-13 12:33:49 -04:00
Claude Paroz
aa5ab114e3
Fixed #24122 -- Redirected to translated url after setting language
...
Thanks gbdlin for the initial patch and Tim Graham for the review.
2015-03-13 16:46:40 +01:00
Bas Peschier
c9f1a12925
Fixed #24013 -- Fixed escaping of reverse() prefix.
...
Prefix was treated as a part of the url pattern, which it is not.
Improved tests to conform with RFC 3986 which allows certain
characters in path segments without being escaped.
2015-03-12 19:05:17 -04:00
Bas Peschier
f0f5212624
Fixed #12943 -- Allowed unnamed arguments to be propagated in includes
...
Propagated unnamed arguments as positional arguments into included
URLconfs if no named arguments are defined. Positional and keyword
arguments are never combined.
2015-03-12 09:18:39 -04:00
Claude Paroz
578ac17f81
Made runserver use leave_locale_alone
2015-03-09 18:59:27 +01:00
Marten Kenbeek
e272904ff7
Fixed #23407 -- Extended coverage of makemigrations --noinput option.
...
Changed --noinput option in makemigrations to suppress all user prompts,
not just when combined with --merge.
2015-03-08 19:44:14 +01:00
Bas Peschier
336512fae7
Fixed #23173 -- Fixed incorrect stripping of SCRIPT_URL
2015-03-08 15:48:27 +01:00
Claude Paroz
767c33d1fa
Fixed #24369 -- Prevented crash when flushing before db migration
...
Thanks Thomas Tanner for the report and Tim Graham for the review.
2015-03-05 08:57:28 +01:00
Claude Paroz
23c612199a
Simplified emit_post_migrate from flush command
...
Follow-up of f4f24d30e0
.
2015-02-28 16:10:32 +01:00
Claude Paroz
90ab6ee612
Revert "Fixed #24369 -- Prevented crash when `flush`ing before db migration"
...
This reverts commit 9f1dbe29c0
.
The proposed solution does not pass the test suite.
2015-02-28 12:11:27 +01:00
Claude Paroz
9f1dbe29c0
Fixed #24369 -- Prevented crash when `flush`ing before db migration
...
Thanks Thomas Tanner for the report.
2015-02-28 10:12:32 +01:00
Aymeric Augustin
556a74879f
Fixed a few uses of Template that relied on a default engine.
...
Refs #24389 .
2015-02-22 23:13:55 +01:00
Aymeric Augustin
c688460df6
Removed rmtree_errorhandler.
...
The stated reason for its introduction in d18d37ce
no longer applies
since Django's code repository was switched from Subversion to git.
Furthermore it never had any effect because shutil.rmtree ignores its
onerror argument when ignore_errors is True.
The reason for its use in template management commands is unclear.
2015-02-22 23:09:42 +01:00
Loic Bistuer
bed504d70b
Fixed #24351 , #24346 -- Changed the signature of allow_migrate().
...
The new signature enables better support for routing RunPython and
RunSQL operations, especially w.r.t. reusable and third-party apps.
This commit also takes advantage of the deprecation cycle for the old
signature to remove the backward incompatibility introduced in #22583 ;
RunPython and RunSQL won't call allow_migrate() when when the router
has the old signature.
Thanks Aymeric Augustin and Tim Graham for helping shape up the patch.
Refs 22583.
2015-02-20 21:34:09 +07:00
Alex Vidal
e467919c63
Fixed typo in django.core.servers.basehttp message.
2015-02-19 19:31:49 -05:00
Tim Graham
81a94cc616
Refs #24324 -- Fixed makemessages crash when Django is installed in a non-ASCII path.
2015-02-17 08:06:33 -05:00
Tim Graham
4a0aeac1b5
Refs #24324 -- Fixed management command discovery on non-ASCII paths.
2015-02-17 07:27:47 -05:00
Andriy Sokolovskiy
5c995dcfc2
Fixed #24320 - Used field.value_to_string() in serialization of foreign key.
...
This fixes serialization of a ForeignKey to a UUIDField as the
test indicates.
2015-02-13 12:37:23 -05:00
Markus Holtermann
f287bec583
Fixed #24184 -- Prevented automatic soft-apply of migrations
...
Previously Django only checked for the table name in CreateModel
operations in initial migrations and faked the migration automatically.
This led to various errors and unexpected behavior. The newly introduced
--fake-initial flag to the migrate command must be passed to get the
same behavior again. With this change Django will bail out in with a
"duplicate relation / table" error instead.
Thanks Carl Meyer and Tim Graham for the documentation update, report
and review.
2015-02-13 14:29:59 +01:00
Tim Graham
c970018f41
Removed Django 1.7 MIDDLEWARE_CLASSES upgrade check.
2015-02-09 19:16:07 -05:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Tim Graham
bbe28496d3
Removed old import aliases.
2015-02-05 19:37:01 -05:00
Aymeric Augustin
de62b8ef45
Simplified handling of RegexURLResolver.urlconf_module.
...
Also made RegexURLResolver.url_patterns a cached property for
consistency and efficiency.
2015-02-05 12:43:55 +01:00
darkryder
9ec8aa5e5d
Fixed #24149 -- Normalized tuple settings to lists.
2015-02-03 14:59:45 -05:00
Jon Dufresne
24b2bc635e
Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib.
2015-01-28 06:59:40 -05:00
R3v1L
4a5512a61d
Refs #16905 -- Replaced call to removed method in runserver
...
Regression introduced in 0f169098ef
2015-01-19 12:26:00 +01:00
Tim Graham
7e8cf74dc7
Removed support for syncing apps without migrations per deprecation timeline.
...
Kept support for creating models without migrations when running tests
(especially for Django's test suite).
2015-01-18 15:58:06 -05:00
Tim Graham
0f169098ef
Removed BaseCommand.validate() per deprecation timeline; refs #16905 .
2015-01-18 14:49:51 -05:00
Tim Graham
c3336e7e4f
Removed dumpdata --natural option and serializers use_natural_keys parameter.
...
Per deprecation timeline; refs #13252 .
2015-01-17 20:18:34 -05:00
Tim Graham
40d6b376d4
Removed BaseMemcachedCacheMethods._get_memcache_timeout backwards compatibility shim.
...
Per deprecation timeline; refs #21147 .
2015-01-17 19:32:54 -05:00
Tim Graham
0622bca5d1
Removed the validate management command per deprecation timeline.
2015-01-17 19:12:03 -05:00
Tim Graham
e278407b20
Removed unused imports from previous commit.
2015-01-17 13:22:52 -05:00
Tim Graham
4a03d348c7
Removed BaseCommand.requires_model_validation per deprecation timeline.
2015-01-17 12:59:07 -05:00
Tim Graham
00a11994a5
Removed support for AppCommand.handle_app() per deprecation timeline.
2015-01-17 12:34:34 -05:00
Tim Graham
b845951fd4
Required sqlparse for SQL splitting per deprecation timeline.
2015-01-17 10:20:30 -05:00
Tim Graham
4aa089a9a9
Removed support for custom SQL per deprecation timeline.
2015-01-17 10:16:06 -05:00
Tim Graham
67235fd4ef
Removed support for initial_data fixtures per deprecation timeline.
2015-01-17 09:59:25 -05:00
Tim Graham
d038c547b5
Removed django.core.cache.get_cache() per deprecation timeline; refs #21012 .
2015-01-17 09:55:18 -05:00
Tim Graham
f6463bb380
Removed the syncdb command per deprecation timeline.
2015-01-17 09:20:12 -05:00
Tim Graham
f4f24d30e0
Removed pre_syncdb and post_syncdb signals per deprecation timeline.
2015-01-17 09:07:00 -05:00
Tim Graham
fed25f1105
Removed compatibility with Python 3.2.
2015-01-17 09:00:17 -05:00
Tim Graham
41f0d3d3bc
Removed FastCGI support per deprecation timeline; refs #20766 .
2015-01-17 08:32:31 -05:00
Tim Graham
75f107b884
Removed request.REQUEST per deprecation timeline; refs #18659 .
2015-01-17 08:05:18 -05:00
Claude Paroz
dc90bf2ac8
Removed unused import
2015-01-14 09:31:24 +01:00
Carl Meyer
316b8d4974
Stripped headers containing underscores to prevent spoofing in WSGI environ.
...
This is a security fix. Disclosure following shortly.
Thanks to Jedediah Smith for the report.
2015-01-13 13:03:05 -05:00
Claude Paroz
4c413e231c
Fixed #17785 -- Preferred column names in get_relations introspection
...
Thanks Thomas Güttler for the report and the initial patch, and
Tim Graham for the review.
2015-01-12 19:58:47 +01:00
Markus Holtermann
eeb88123e7
Fixed #24129 -- Added indicator that migrations are rendering the initial state
...
Thanks Tim Graham for the review.
2015-01-12 19:23:46 +01:00
Pavel Shpilev
a7c256cb54
Fixed #9893 -- Allowed using a field's max_length in the Storage.
2015-01-12 09:09:18 -05:00
Claude Paroz
f7c287fca9
Fixed #24073 -- Deactivated translations when leave_locale_alone is False
...
Thanks Tim Graham and Markus Holtermann for the reviews.
2015-01-07 20:11:24 +01:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Danilo Bargen
2e65d56156
Fixed #20003 -- Improved and extended URLValidator
...
This adds support for authentication data (`user:password`) in URLs,
IPv6 addresses, and unicode domains.
The test suite has been improved by adding test URLs from
http://mathiasbynens.be/demo/url-regex (with a few adjustments,
like allowing local and reserved IPs).
The previous URL validation regex failed this test suite on 13
occasions, the validator was updated based on
https://gist.github.com/dperini/729294 .
2015-01-06 14:04:25 -05:00
Claude Paroz
9f328405f6
Fixed gettext version regex
...
...with the theoretical assumption that gettext may once reach a
two-digit number. Thanks Walter Doekes for noticing this potential
issue.
2015-01-06 18:43:32 +01:00
Markus Holtermann
e08318b4ef
Refs #23359 -- Removed double newline from output of migrate --list
...
Thanks Berker Peksag for the review.
2015-01-05 14:52:54 -05:00
Claude Paroz
6e1c9c6568
Fixed #8280 -- Allowed management command discovery for eggs
...
Thanks jdetaeye for the report, bhuztez and jdetaeye for the
initial patches, Tim Graham and Berker Peksag for the reviews.
2015-01-05 17:19:35 +01:00
Collin Anderson
3d2cae0896
Fixed #24072 -- Added FileResponse for streaming binary files.
2015-01-05 10:51:52 -05:00
Daniel Pyrathon
8958170755
Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions
2015-01-02 10:46:04 -05:00
Claude Paroz
285bd02c92
Show migration elapsed time when verbosity>1
...
This facilitates performance debugging related to migrations.
2015-01-02 15:37:09 +01:00
Andreas Pelme
4ee06ec3fc
Fixed #24069 -- Made ServerHandler a new style class to fix super() call.
2015-01-02 08:51:28 -05:00
Tim Graham
b4bdd5262b
Fixed #23366 -- Fixed a crash with the migrate --list command.
2014-12-31 17:26:15 -05:00
Andrey Maslov
7a878ca5cb
Fixed #24008 -- Fixed ValidationError crash with list of dicts.
2014-12-31 14:43:13 -05:00
Markus Holtermann
a1487deebf
Fixed #23359 -- Added showmigrations command to list migrations and plan.
...
Thanks to Collin Anderson, Tim Graham, Gabe Jackson, and Marc Tamlyn
for their input, ideas, and review.
2014-12-31 14:14:28 -05:00
Ramiro Morales
002a8ffe47
Fixed breakage by 6fb9dee4
under Python2+Windows.
...
Refs #23271
2014-12-29 21:04:27 -03:00
Claude Paroz
1d24f073e6
Fixed #21255 -- Closed connections after management command ran
...
Thanks kabakov.as@gmail.com for the report, and Aymeric Augustin,
Simon Charette for the reviews.
2014-12-29 19:02:45 +01:00
Ramiro Morales
6fb9dee470
Fixed #23271 -- Don't corrupt PO files on Windows when updating them.
...
Make sure PO catalog text fetched from gettext programs via standard
output isn't corrupted by mismatch between assumed (UTF-8) and real
(CP1252) encodings. This can cause mojibake to be written when creating
or updating PO files.
Also fixes #23311 .
Thanks to contributor with Trac nick 'danielmenzel' for the report,
excellent research and fix.
2014-12-29 12:24:50 -03:00
Aymeric Augustin
92e8f1f302
Moved context_processors from django.core to django.template.
2014-12-28 17:00:07 +01:00
Tim Graham
75bbcfa332
Replaced sqlall in some bash_completion/admin_scripts tests.
...
sqlall will be removed in Django 1.9, so now's a good time to remove
its usage where it's not important.
2014-12-26 18:52:26 -05:00
Tim Graham
c2e419c267
Fixed #24054 -- Enabled sqlsequencereset for apps with migrations.
2014-12-26 15:55:34 -05:00
Claude Paroz
234a2e0b6b
Fixed #23866 -- Harmonized refs to Django documentation from code
2014-12-25 13:53:13 +01:00
Tim Graham
426ead27bd
Removed shutil.copystat copied from stdlib (added to support an old Python?).
2014-12-24 19:29:33 -05:00
Collin Anderson
5dddd79433
Fixed #20349 -- Moved setting_changed signal to django.core.signals.
...
This removes the need to load django.test when not testing.
2014-12-24 07:18:43 -05:00
Claude Paroz
30cbd5d360
Replaced DatabaseCreation sql methods by schema editor equivalents
...
Also used schema editor in migrate to sync unmigrated apps (sync_apps).
Refs #22340 . Thanks Tim Graham for the review.
2014-12-23 19:35:01 +01:00
Claude Paroz
9fecb86a52
Fixed #17946 -- Fixed deserialization of self-referencing M2M fields
...
Thanks Philip Mountifield for the report and excellent analysis, and
Simon Charette for the review.
2014-12-23 16:01:39 +01:00
Claude Paroz
9bcd4d812c
Fixed #23788 (2) -- Improved gettext version checker
...
Thanks Tim Graham for the report and initial patch.
2014-12-18 16:06:33 +01:00
Tim Graham
d2ff8a7241
Fixed #23975 -- Restored pre_migrate signal if all apps have migrations.
...
Thanks kmmbvnr for the report.
2014-12-16 18:34:25 -05:00
Claude Paroz
8f97413fae
Fixed #20968 -- Checked Spatialite metadata before migrations
...
Thanks Kenial S. Lee for the initial patch and Tim Graham for
the review.
2014-12-08 22:22:53 +01:00
Jon Dufresne
4468c08d70
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
2014-12-08 07:58:23 -05:00
Tim Graham
5c773447c3
Tweaked fix for refs #23946 ; thanks Claude.
2014-12-02 15:57:08 -05:00
Andriy Sokolovskiy
bba545345f
Fixed #23946 -- Fixed runserver crash when socket error contains Unicode chars.
2014-12-02 12:01:51 -05:00
Matthew Somerville
9253042d53
Fixed #4444 - Made runserver suppress 'broken pipe' errors
...
One handler in WSGIServer, to catch the error when raised from
SocketServer.BaseServer's finish_request, and one in WSGIRequestHandler
(by creating a subclass of ServerHandler), to catch the error when
raised in wsgiref.handlers.BaseHandler's finish_response.
2014-11-28 10:51:15 -05:00
Tim Heap
deb607648e
Fixed #23728 -- Added the --exit option to makemigrations.
...
If no changes that need migrations are found, `makemigrations --exit`
exits with error code 1.
2014-11-28 07:48:39 -05:00
Martin Blech
e023ceb453
Fixed #23910 -- Added reply_to parameter to EmailMessage
...
Thanks to Berker Peksag and Tim Graham for the review and suggestions.
2014-11-28 06:00:06 -05:00
Martin Blech
abf87333a1
Fixed #23924 -- Made EmailMessage raise TypeError for type checks
2014-11-27 18:43:45 -05:00
Berker Peksag
093e6c68b9
Fixed #14664 -- Logged a warning if MiddlewareNotUsed is raised in DEBUG mode.
2014-11-27 07:55:07 -05:00
Martin Blech
4c123d0f79
Fixed #23899 -- Added 'Generated by Django X.Y' to startproject template.
2014-11-25 09:41:56 -05:00
Sergey Fedoseev
1e9ac504e4
Fixed #23888 -- Fixed crash in File.__repr__() when name contains unicode.
2014-11-24 15:54:57 -05:00
Tim Graham
ebb927c4c9
Removed workaround for lack of os.getpid() in Jython.
...
The Jython bug was fixed in http://bugs.jython.org/issue1518
(tested on Jython 2.7b3); also updated make_msgid() to be more like
the version in Python 3.2+; refs #23905 .
Thanks Simon Charette for testing and review.
2014-11-24 14:01:15 -05:00
Berker Peksag
a5bd7f2cb2
Fixed #13694 -- Made SafeMIMEText's constructor compatible with MIMEText.
2014-11-24 13:28:58 -05:00
Carl Meyer
bcb693ebd4
Revert "Fixed #23892 -- Made deconstructible classes forwards compatible"
...
This reverts commit f36151ed16
.
Adding kwargs to deconstructed objects does not achieve useful
forward-compatibility in general, since additional arguments are silently
dropped rather than having their intended effect. In fact, it can make the
failure more difficult to diagnose. Thanks Shai Berger for discussion.
2014-11-22 22:29:23 -07:00
Carl Meyer
f36151ed16
Fixed #23892 -- Made deconstructible classes forwards compatible
2014-11-22 14:30:14 -07:00
Claude Paroz
b38637d581
Fixed #23887 -- Returned Bad Request for multipart parsing fails
...
Thanks Antti Häyrynen and Tim Graham for the report, and Aymeric
Augustin for the review.
2014-11-22 14:23:37 +01:00
Brad Walker
54d3dcbc51
Removed reduce() usage in makemigrations; refs #23796 .
...
A lambda all_items_equal() replaced a reduce() that was broken for potential
3+-way merges. A reduce(operator.eq, ...) accumulates bools and can't
generically check equality of all items in a sequence:
>>> bool(reduce(operator.eq, [('migrations', '0001_initial')] * 3))
False
The code now counts the number of common ancestors to calculate slice offsets
for the branches. Each branch shares the same number of common ancestors.
The common_ancestor for loop statement had incomplete branch coverage.
2014-11-20 14:33:30 -05:00
Brad Walker
cfa26f29bd
Reduced reduce() usage; refs #23796 .
...
django.core.exceptions.ValidationError.messages() and
django.db.backends.schema.BaseDatabaseSchemaEditor._alter_field():
Replaced reduce(operator.add, ...) w/uncoupled, explicit sum()
2014-11-20 14:31:14 -05:00
Anton Baklanov
d63703f1cd
Fixed #18714 -- Added 'fuzzy' compilemessages option
2014-11-18 22:44:16 +01:00
Tillmann Karras
d188101319
Fixed #23799 -- Made makemigrations respect --no-optimize.
...
Thanks to yamila-moreno for the idea of a skip message.
2014-11-18 07:37:06 +01:00
Claude Paroz
684b2077b3
Improved readability of negative condition in makemessages
...
Thanks Berker Peksag for the suggestion.
2014-11-17 13:42:14 +01:00
Claude Paroz
6a05f0dfe3
Simplified handle_extensions management utility
...
makemessages now doesn't need any special ignoring logic, after
commit bb4a92d784
.
2014-11-17 09:24:56 +01:00
Ilja Maas
bb4a92d784
Fixed #23840 -- Fixed makemessages find_files method
...
Changed the handling of extensions to be used for gettext. Now
obeying the --extension argument. find_files now only find the
given or default extensions and puts only these in the
TranslatableFiles. As a result there are no more confusing messages
for filetypes (extension) not handled by makemessages.
2014-11-17 09:21:24 +01:00
Berker Peksag
d2d6c0c097
Fixed #21363 -- Added datetime.timedelta support to TimestampSigner.unsign().
2014-11-15 19:36:33 +01:00
Claude Paroz
35dac5070b
Added a new GeoJSON serialization format for GeoDjango
...
Thanks Reinout van Rees for the review.
2014-11-15 18:07:18 +01:00
Michael Manfre
a305695f28
Merge pull request #3481 from manfre/ticket-16358
...
Fixed #16358 - Made memcache backend delete old value on a failure to set.
2014-11-13 22:10:22 -05:00
Tim Graham
c24a2e6cbd
Fixed #23765 -- Removed BooleanField default check which often yielded false positives.
2014-11-13 20:12:29 +01:00
Michael Manfre
bc8abe36ba
Fixed #16358 - Made memcache backend delete old value on a failure to set.
...
Default Memcached configuration allows for a maximum object of 1MB and
will fail to set the key if it is too large. The key will be deleted from
memcached if it fails to be set. This is needed to avoid an issue with
cache_db session backend using the old value stored in memcached, instead
of the newer value stored in the database.
2014-11-13 00:46:03 -05:00
Aymeric Augustin
f742c653e0
Removed return from __init__.
...
__init__ isn't allowed to return anything other than None and it isn't
common practice to include a return statement.
2014-11-12 21:26:31 +01:00
Aymeric Augustin
3bc7a14ea5
Normalized opening a file and decoding its content.
...
`io.open` is required on Python 2.7. Just `open` would work on Python 3.
2014-11-11 22:54:27 +01:00
Aymeric Augustin
95b8323ac2
Removed import forgotten in previous commit.
2014-11-11 22:54:26 +01:00
Claude Paroz
5ec367ccdd
Fixed #23788 -- Used new JavaScript support in recent gettext
...
JavaScript string extraction support has been added in gettext
0.18.3.
Thanks Aymeric Augustin for the review.
2014-11-11 22:52:30 +01:00
Aymeric Augustin
b8ba73cd0c
Raised SuspiciousFileOperation in safe_join.
...
Added a test for the condition safe_join is designed to prevent.
Previously, a generic ValueError was raised. It was impossible to tell
an intentional exception raised to implement safe_join's contract from
an unintentional exception caused by incorrect inputs or unexpected
conditions. That resulted in bizarre exception catching patterns, which
this patch removes.
Since safe_join is a private API and since the change is unlikely to
create security issues for users who use it anyway -- at worst, an
uncaught SuspiciousFileOperation exception will bubble up -- it isn't
documented.
2014-11-11 19:05:14 +01:00
averybigant
b7a5b6ab86
Fixed #23750 -- Allowed core.checks.register to be used as a function
2014-11-11 16:29:32 +01:00
Veres Lajos
a71a2ea756
Fixed typos using https://github.com/vlajos/misspell_fixer
2014-11-03 20:59:30 -05:00
Konrad Świat
934a16dc93
Fixed #23468 -- Added checks for duplicate fixtures directories in loaddata.
...
If settings.FIXTURE_DIRS contains duplicates or a default fixture
directory (app_name/fixtures), ImproperlyConfigured is raised.
Thanks to Berker Peksag and Tim Graham for review.
2014-10-31 18:21:54 -04:00
Matthew Somerville
cc25bfebd5
Clarified BaseCommand --traceback behavior.
2014-10-30 14:15:31 -04:00
Jon Dufresne
eb4f6de980
Fixed #8149 -- Made File.__iter__() support universal newlines.
...
The following are recognized as ending a line: the Unix end-of-line
convention '\n', the Windows convention '\r\n', and the old
Macintosh convention '\r'.
http://www.python.org/dev/peps/pep-0278
Thanks tchaumeny for review.
2014-10-30 11:52:59 -04:00
Claude Paroz
528c9af543
Fixed #23717 -- Fixed makemessages crash when STATIC_ROOT=None
2014-10-27 13:56:25 +01:00
Tony Zhu
dd1ea70779
Fixed #23699 -- Prevented flush from loading initial data for apps with migrations.
2014-10-27 06:56:44 -04:00
Loic Bistuer
eb82fb0a9d
Refactored color_style() and no_style() to improve testability. Refs #23663 .
...
This includes the following improvements:
- The type of the style object is now called 'Style' rather than 'dummy'.
- The new make_style() function allows generating a Style object directly
from a config string. Before the only way to get a style object was
through the environ and it also required that the terminal supported
colors which isn't necessarily the case when testing.
- The output of no_style() is now cached with @lru_cache.
- The output of no_style() now has the same set of attributes as the
other Style objects. Previously it allowed anything to pass through
with __getattr__.
2014-10-22 11:27:00 +07:00
Loic Bistuer
bdb4118b1a
Fixed #23686 -- Tweak color output of the system check framework.
...
Thanks Tim Graham for the review.
2014-10-22 11:27:00 +07:00
Loic Bistuer
533532302a
Fixed #23663 -- Initialize output streams for BaseCommand in __init__().
...
This helps with testability of management commands.
Thanks to trac username daveoncode for the report and to
Tim Graham and Claude Paroz for the reviews.
2014-10-22 09:25:50 +07:00
Claude Paroz
8b4cc9df9c
Fixed #23583 -- More selectively ignored static/media roots
...
Fixed a regression introduced by 28efafa24c
.
Thanks Michal Čihař for the report and initial patch, and
Collin Anderson and Tim Graham for the reviews.
2014-10-21 20:18:21 +02:00
Loic Bistuer
c34e13e17c
Fixed #23107 -- Made runserver output respect --no-color.
...
This commit reverts 67d7da5fb9
.
The previous fix changed the environment globally, which meant
that any call to `call_command(no_color=True)` prevented further
`call_command` with color.
This fix still relies on the environment because it's currently the only
way to reach WSGIRequestHandler, but it's now limited to the `runserver`
command. This seems an acceptable compromise considering `runserver` runs
indefinitely.
Thanks Tim Graham for the review.
2014-10-22 01:03:15 +07:00
Claude Paroz
4fe6824ffd
Fixed #23679 -- Fixed null introspection for char/text fields
...
Thanks Paul Dejean for the report.
2014-10-20 22:37:19 +02:00
Claude Paroz
b8f2c972d0
Removed redundant skip_checks option for call_command
2014-10-20 17:26:00 +02:00
Claude Paroz
6d11bb102d
Revert "Fixed #23650 -- Prevented migrate from calling checks 3 times"
...
This reverts commit 8d6e1afe0b
.
call_command now always set skip_checks to True (tested in
user_commands).
2014-10-20 17:26:00 +02:00
Claude Paroz
685edab9da
Fixed #23685 -- Made call_command skip checks by default
...
Thanks Loic Bistuer for the report/review and Tim Graham for the
review.
2014-10-20 17:26:00 +02:00
Loic Bistuer
c974b7bbe0
Renamed skip_validation into skip_checks as the former is now deprecated.
2014-10-19 18:00:54 +07:00
Loic Bistuer
ec8a2e3b07
Prevented syncdb from calling system checks multiple times. Refs #23650 .
2014-10-19 18:00:53 +07:00
Claude Paroz
8d6e1afe0b
Fixed #23650 -- Prevented migrate from calling checks 3 times
...
Thanks Ilya Baryshev for the report and Tim Graham for the review.
2014-10-17 20:20:56 +02:00
Tim Graham
7ae03204ac
Fixed #23469 -- Removed test runner compatibility check which often yielded false positives.
2014-10-17 10:31:49 -04:00
Rigel Di Scala
a5c77417a6
Fixed #23615 -- Validate that a Model instance's "check" attribute is a method.
...
The "check" name is a reserved word used by Django's check framework,
and cannot be redefined as something else other than a method, or the check
framework will raise an error.
This change amends the django.core.checks.model_check.check_all_models()
function, so that it verifies that a model instance's attribute "check"
is actually a method. This new check is assigned the id "models.E020".
2014-10-16 23:49:21 +07:00
Collin Anderson
a6a8268d19
Fixed #23660 -- Moved sort_dependencies to core.
2014-10-16 03:04:13 +07:00
Anubhav Joshi
10b17a22be
Fixed #19508 -- Implemented uri_to_iri as per RFC.
...
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz
for the review.
2014-10-16 02:31:17 +07:00
Claude Paroz
59d487e7fc
Fixed #23638 -- Prevented crash while parsing invalid cookie content
...
Thanks Philip Gatt for the report and Tim Graham for the review.
2014-10-13 17:37:58 +02:00
Florian Apolloner
8d789449c7
Fixed #23063 -- Convert \n and \r to \r\n when using the SMTP backend as per RFC.
2014-10-12 22:01:24 +02:00
Thomas Chaumeny
6448dd8335
Fixed #23642 -- Made LocMemCache.incr() thread-safe as documented
2014-10-12 23:47:48 +07:00
Jaap Roes
1b5918f160
Fixed #23625 -- Removed CacheClass shim
2014-10-10 08:43:26 -04:00
Brandon Taylor
16ed35fafc
Fixed #23612 -- Normalized fixuture paths to allow referencing relative paths on Windows.
2014-10-09 14:58:20 -04:00
Jon Dufresne
c1ef234e31
Fixed #23522 -- Changed reverse() to return a Unicode string; not bytes
2014-10-07 13:06:39 -04:00
Markus Holtermann
2f16ff5a6c
Fixed #23601 -- Ensured view exists in URLconf before importing it in admindocs.
2014-10-06 09:31:39 -04:00
Thomas Chaumeny
b2aad7b836
Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
...
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Claude Paroz
e1fbb68e4e
Updated comment about Python issue
2014-09-27 22:48:30 +02:00
Marco Buttu
e077c29155
Fixed #23551 -- Fixed bash autocompletion crash on Python 3.
2014-09-25 07:44:22 -04:00
Claude Paroz
ed297061a6
Fixed #18782 -- Prevented sql_flush to flush views
...
Thanks rodolfo_3 for the report and the initial patch, and
Josh Smeaton, Shai Berger and Tim Graham for the reviews.
2014-09-23 20:13:31 +02:00
José Padilla
5472d18e31
Fixed #23461 -- Added EMAIL_TIMEOUT setting
2014-09-13 09:33:21 -04:00
Tim Graham
52ef6a4726
Fixed #17101 -- Integrated django-secure and added check --deploy option
...
Thanks Carl Meyer for django-secure and for reviewing.
Thanks also to Zach Borboa, Erik Romijn, Collin Anderson, and
Jorge Carleitao for reviews.
2014-09-12 15:05:23 -04:00
Andi Albrecht
00535e8e6b
Fixed #20743 -- Added support for keyfile/certfile in SMTP connections.
...
Thanks jwmayfield, serg.partizan, and Wojciech Banaś for work on the patch.
2014-09-10 11:14:20 -04:00
Flavio Curella
c53f2451a8
Fixed #23398 -- Added helpful error message when runserver is accessed via HTTPS
2014-09-09 12:29:30 -04:00
Tim Graham
0e4d79c4f0
Fixed #22882 -- Fixed a UnicodeDecodeError in flush.
...
Thanks djbaldey for the report.
2014-09-06 10:07:34 -04:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -04:00
Raffaele Salmaso
1435cfbe8d
Fixed #23302 -- Added --name/-n option to makemigrations command
2014-09-02 21:09:18 -04:00
Bas Peschier
eacf244506
Converted sql_queries into a lazily evaluated list.
...
Fixed #23364 . Thanks Markush2010 for the report.
2014-08-30 13:27:56 +02:00
Joshua "jag" Ginsberg
eb2af16c59
Fixed #21483 -- Added WSGI environ to kwargs sent to request_started signal.
2014-08-29 10:12:03 -04:00
Tim Graham
cf33777306
Clarified a comment in django.core.files.temp.
2014-08-29 07:27:15 -04:00
Simon Charette
1e404180c1
Fixed #23379 -- Corrected a referencing issue in sql_create.
...
Thanks to Trac alias flakfizer for the report.
2014-08-28 15:17:50 -04:00
areski
0396cd8f19
Fixed #23327 -- Added 'zero' syntax to migrate help message
2014-08-22 13:40:14 -04:00
Tim Graham
0d8d30b7dd
Fixed #23157 -- Removed O(n) algorithm when uploading duplicate file names.
...
This is a security fix. Disclosure following shortly.
2014-08-20 14:39:40 -04:00
Florian Apolloner
28e765810d
Prevented reverse() from generating URLs pointing to other hosts.
...
This is a security fix. Disclosure following shortly.
2014-08-20 14:39:40 -04:00
Gabriel Muñumel
3e241313a4
Fixed #23136 -- Added a message when sqlclear does nothing
2014-08-18 13:20:29 -04:00
Baptiste Mispelon
5853c87a45
Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.
2014-08-18 18:55:12 +02:00
Ramiro Morales
152afadef1
Merge pull request #3075 from ramiro/makemessages-ignore-windows
...
Fixed #23298 -- Made makemessages actually ignore specified dirs on Wind...
2014-08-18 13:33:02 -03:00
Raffaele Salmaso
e0a98e2374
Fixed #23309 -- Fixed call_command to parse args correctly
2014-08-18 17:54:24 +02:00
Ramiro Morales
b4dce7c37a
Fixed #23298 -- Made makemessages actually ignore specified dirs on Windows.
...
This was detected by two failures in the i18n.test_extraction of our
test suite.
Refs #20422 , refs #22336
2014-08-15 16:19:04 -03:00
Ramiro Morales
0bfb538661
Fixed #23291 -- Don't add Unicode varname/value to environment.
...
Windows doesn't like that and it causes 114 failures in the
admin_scripts tests with Python 2.x.
2014-08-14 12:22:21 -03:00
Claude Paroz
055d95fce0
Fixed #23265 -- Used system-specific encoding in runserver
...
Thanks SpaceFox for the report.
2014-08-14 12:08:06 +02:00
Tim Graham
7f4be9cbc2
Fixed flake8 warning.
2014-08-13 12:33:18 -04:00
Claude Paroz
2cc8ffe258
Fixed #22985 -- Made call_command accept option name parameter
...
Thanks giulettamasina for the report and Tim Graham for the review.
2014-08-12 21:53:29 +02:00
Claude Paroz
dc462a8ed5
Removed unused migrate option
2014-08-09 17:13:00 +02:00
Justin Hamade
8fe406864c
Fixed #22336 -- Added path matching for makemessages ignore option
...
This fixes a regression introduced by 9012a9e200
.
2014-08-08 22:54:30 +02:00
Florian Apolloner
2d542bf60c
Ensured that Paginator.page_range works the same on Python 2 and 3.
...
This somewhat fixes #23088 , refs 23140.
2014-08-03 21:10:00 +02:00
Florian Apolloner
40fb6a5601
Revert "Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`."
...
This reverts commit 6508db2ff9
.
Refs #23088 .
2014-08-03 21:08:24 +02:00
Christoph Heer
d47409831f
Fixed #23067 -- Updated docs to use django-admin
2014-07-30 14:14:03 -04:00
areski
67d7da5fb9
Fixed #23107 -- Made runserver output respect --no-color.
2014-07-30 12:58:53 -04:00
Andrew Godwin
096a5de5d2
Fixed #23092 : Squashing handles external dependencies
2014-07-29 10:22:00 -07:00
Andrew Godwin
8ebd6d35d7
Fixed #23090 : Document and enforce not double-squashing migrations
2014-07-29 10:02:59 -07:00
Florian Apolloner
2ab0ed7b28
Only warn about initial data if fixtures have been found.
2014-07-27 13:23:16 +02:00
Anubhav Joshi
5cdb8f8c1e
Fixed #16617 -- Added 'value' to BaseValidator params.
...
Also allowed overriding the default messages in subclasses of BaseValidator.
Thanks sperrygrove for initial patch.
2014-07-26 10:03:00 -04:00
Andrew Godwin
f44dbf74a4
Mark initial_data as deprecated separately from syncdb. Refs #23077 .
2014-07-25 09:09:15 -07:00
Moayad Mardini
6508db2ff9
Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`.
2014-07-25 11:04:58 +03:00
Damien Nozay
70c54a3694
Fixed #23028 : Added unique_togther support to inspectdb.
2014-07-18 16:10:59 +00:00
Claude Paroz
28efafa24c
Ignored STATIC_ROOT and MEDIA_ROOT in makemessages
...
Also alleviate issues with weird file names typically found in
MEDIA_ROOT directories (#23010 ).
Thanks Tim Graham for the review.
2014-07-16 09:38:57 +02:00
Huu Nguyen
f7a78f9bba
Fixed #22791 -- Invoke interactive questioner only for conflicts in specified apps.
...
Thanks bendavis78 for the report and Tim Graham for the review.
2014-07-14 11:00:49 -04:00
Tim Graham
b48c2c5925
Removed extra newline.
2014-07-12 10:16:53 -04:00
Andrew Godwin
ebb13bbd88
Fixed #22983 : Alert when squashing RunPython operations with referred functions.
2014-07-11 19:00:39 -07:00
Claude Paroz
e167e96cfe
Fixed #22223 -- Prevented over-escaping URLs in reverse()
...
And follow more closely the class of characters defined in the
RFC 3986.
Thanks Erik van Zijst for the report and the initial patch, and
Tim Graham for the review.
2014-07-09 09:54:34 +02:00
Claude Paroz
b144bfb5ce
Fixed #21079 -- Further normalized table names in inspectdb
...
Thanks Michael Manfre for the report and Tim Graham for the review.
2014-07-06 21:19:27 +02:00
Daniel Hahler
67f9f385aa
Fixed various minor doc typos / references.
2014-07-05 20:26:26 -04:00
Tim Graham
1f8bb95cc2
Corrected domain max length for EmailValidator; refs #20631 .
...
Thanks MarkusH for the report.
2014-07-04 20:50:28 -04:00
Tim Graham
7fd55c3481
Fixed #20631 -- Increased the default EmailField max_length to 254.
...
Thanks pmartin for the report.
2014-07-04 14:15:00 -04:00
Loic Bistuer
1966054feb
Fixed #22915 -- Document backward incompatible changes in the ValidationError constructor.
...
This patch also fixes update_error_dict to better handle the use case described
in this ticket, previously the type of the provided container could be lost in
some conditions.
Thanks Russell Keith-Magee for the report and Tim Graham for review.
2014-07-04 17:05:31 +07:00
Ian Foote
4c39c270af
Add missing spaces to implicitly joined strings
2014-06-29 22:56:21 +01:00
Anubhav Joshi
dbbcfca476
Fixed #21668 -- Return detailed error page when SuspiciousOperation is raised and DEBUG=True
...
Thanks GDorn and gox21 for report.
Thanks Tim Graham for idea and review.
2014-06-24 08:55:36 -04:00
Andrew Godwin
0fba4c0ed7
Fixed #22487 : Don't flush out data from before normal TestCases
2014-06-23 20:25:09 -07:00
Anubhav Joshi
7f76251fb7
Refactored common code in handlers/base.py and urlresolvers.py
2014-06-23 15:27:25 -04:00
Claude Paroz
9618d68b34
Fixed #8033 -- Explained app registry error during translation setup
...
Thanks Tim Graham and Aymeric Augustin for the review.
2014-06-23 09:31:45 +02:00
Andrew Godwin
ecc06d44ed
Clean up syncdb parts of migrate output if no synced apps
2014-06-22 13:03:25 -07:00
Huu Nguyen
fbb684d95e
Fixed #22862 -- Added --noinput option to makemigrations.
...
Thanks artortenburger for the report.
2014-06-20 08:55:02 -04:00
Claude Paroz
b67e9ed8c9
Swapped placeholders in [sql]migrate command error
2014-06-20 13:53:17 +02:00
Andrew Godwin
9f4852f649
Fixed #22863 : Improve clarity of makemigrations for non-db params
2014-06-19 23:41:32 -07:00
Maxime Turcotte
9996158db4
Fixed #22835 -- Deprecated NoArgsCommand.
2014-06-19 08:54:59 -04:00
Vincent-Vega
4529af9ecf
Fixed #22845 -- Correctly handled memcached default timeout value.
2014-06-16 16:34:00 -04:00
Andrew Godwin
2b79be2bee
Fixed #22848 : Ignore no-migrations errors during makemigrations only
2014-06-16 09:58:35 -07:00
Claude Paroz
c24e979ece
Fixed #7762 -- Hidden full script name in command error output
2014-06-14 20:01:02 +02:00
Claude Paroz
5949c2118d
Restored command error behavior when called from command line
...
Refs #19973 .
2014-06-14 18:53:33 +02:00
Alex Gaynor
2ca5fc55b0
Fixed several flake8 errors
2014-06-14 10:20:42 -04:00
Claude Paroz
f17b24e407
Converted remaining management commands to argparse
2014-06-14 13:43:44 +02:00
Claude Paroz
4b4524291a
Converted test management command to argparse
...
Keeping backwards compatibility with test_runner.option_list is
tricky and would imply transforming an optparse.Option to an
argparse.Action. I choose to introduce a backwards incompatible
change because it only affects testing, not runtime behavior.
2014-06-14 13:43:39 +02:00
Claude Paroz
8568638603
Fixed #19973 -- Replaced optparse by argparse in management commands
...
Thanks Tim Graham for the review.
2014-06-14 11:17:48 +02:00
mlavin
4696cd9671
Fixed #22477 -- Removed contrib middleware from the global settings defaults.
...
Also added a compatibility check for changed middleware defaults.
Forwardport of d94de802d3
from stable/1.7.x
2014-06-13 12:45:56 -04:00
Loic Bistuer
6e8d614acd
Made the vendored NamedTemporaryFile work as a context manager. Refs #22680 .
...
This fixes a regression on Windows introduced by b7de5f5
.
Thanks Tim Graham for the report and review.
2014-06-12 08:07:34 +07:00
Florian Apolloner
e2efc8965e
Fixed #22680 -- I/O operation on closed file.
...
This patch is two-fold; first it ensure that Django does close everything in
request.FILES at the end of the request and secondly the storage system should
no longer close any files during save, it's up to the caller to handle that --
or let Django close the files at the end of the request.
2014-06-11 08:57:30 +02:00
Tim Graham
93d05536fd
Fixed #22770 -- Removed create_superuser from post_migrate signals.
...
Moved logic to syncdb command for backwards compatibility.
2014-06-10 14:37:37 -04:00
Andrew Godwin
8c12d51ea2
Fixed #22487 : Optional rollback emulation for migrated apps
2014-06-08 19:30:15 -07:00
Andrew Godwin
3f91238adf
Fixed #22777 : Add dependency on through for autodetected M2M adds
2014-06-08 17:12:59 -07:00
Víðir Valberg Guðmundsson
f70f669941
Fixed #22749 : Making SQL management commands migration aware.
2014-06-07 17:18:30 -07:00
Aymeric Augustin
47a9347b98
Fixed #6992 -- Improved error when middleware omits HttpResponse.
...
Thanks guettli for the report.
2014-06-07 19:48:45 +02:00
Unai Zalakain
11284a63d4
Fixed #18314 -- Corrected request.build_absolute_uri() handling of paths starting with //
...
``HttpRequest.build_absolute_uri()`` now correctly handles paths starting with ``//``.
``WSGIRequest`` now doesn't remove all the leading slashes either,
because ``http://test/server `` and http://test//server `` aren't the same thing
(RFC2396).
Thanks to SmileyChris for the initial patch.
2014-06-07 08:59:02 -04:00
Moayad Mardini
4f72e5f03a
Fixed #21773 -- made daemon threads default in the development server.
...
Thanks clime for the report.
2014-06-05 12:26:24 -04:00
Claude Paroz
fb9d8f0652
Fixed #22717 -- Auto-corrected missing ending slash in FileSystemStorage
...
Thanks David Fischer for the report and Moayad Mardini for the
review.
2014-06-04 08:53:17 +02:00
Tim Graham
4445d36d47
Fixed #22384 -- Deprecated reversing URLs by dotted path.
2014-06-03 07:30:14 -04:00
Florian Apolloner
83e7555ffe
Revert "Making SQL management commands migration aware."
...
This reverts commit cb9c9a7b58
.
2014-06-01 12:00:09 +02:00
Andrew Godwin
67d9f70e4c
Fix test failure caused by 3149cdce32
2014-05-29 15:34:35 -07:00
Víðir Valberg Guðmundsson
cb9c9a7b58
Making SQL management commands migration aware.
2014-05-29 23:03:10 +02:00
Alex Gaynor
1dcc603eff
Fixed several typos in Django
2014-05-28 17:39:14 -07:00
Simon Charette
d0f7c7f59a
Argument to `reversed` must be a sequence on Py3.
2014-05-27 18:28:13 -04:00
Simon Charette
fed2877cf1
Fix a regression introduced by f011b90363
.
...
`django.get_version` was actually used by the module.
2014-05-27 18:23:44 -04:00
Claude Paroz
f011b90363
Removed an old compatibility shim added in 1.0
2014-05-27 22:28:49 +02:00
Claude Paroz
fe53bc524b
Fixed #21630 -- Simplified management command discovery
...
Thanks Aymeric Augustin for the report end the review.
2014-05-27 22:18:51 +02:00
Aymeric Augustin
4865326f22
Fixed #22699 -- Configure default settings in some management commands.
...
This makes it possible to run django.setup() in management commands that
don't need a settings module. In addition it simplifies error handling.
Thanks Claude for the review.
2014-05-27 21:43:52 +02:00
Moayad Mardini
2e613ea5c5
Fixed #22675 -- makemigrations --dry-run to output migrations to stdout.
...
`makemigrations --dry-run` will output the complete migrations file
that would be written if it's used along with `--verbosity 3`.
2014-05-27 00:40:55 +03:00
Florian Apolloner
9d1bf8f841
Removed executeable bit from a few files.
2014-05-25 23:16:40 +02:00
Loic Bistuer
b7de5f5d3f
Fixed a few ResourceWarning in the test suite. Refs #22680 .
2014-05-26 03:23:17 +07:00
Moayad Mardini
63fc91b3ca
Fixed #22676 -- makemigrations --dry-run should not ask for defaults
...
Made the fix in InteractiveMigrationQuestioner class code, rather than
MigrationAutodetector, because --dry-run shouldn't affect whether
MigrationAutodetector will detect non-nullable fields, but the
questioner should skip the question and returns a None for default
(since that won't be used anyway) if --dry-run is used.
2014-05-24 09:56:18 -04:00
Claude Paroz
dbb48d2bb9
Applied unicode_literals to makemessages command
...
This also fixes #22686 as some sort of side-effect.
2014-05-24 11:51:57 +02:00
Thomas Grainger
46082339d2
the SECRET_KEY is not a hash
2014-05-22 11:19:54 +01:00
Ramiro Morales
fce6a29428
Merge pull request #2498 from ramiro/move-serverhandler
...
Moved ServerHandler helper class to tests.
2014-05-21 18:59:01 -03:00
Claude Paroz
7999ed9b69
Updated Django makemessages process
...
makemessages should now automatically distribute translatable
strings in the proper locale files, for Django too
(see 50a8ab7cd1
).
2014-05-19 09:30:26 +02:00
Tim Graham
c7a4ae94a0
Removed some unnecessary exception naming; thanks claudep.
2014-05-18 17:42:03 -04:00
Esau Rodriguez
ec9043ab2f
Fixed #21799 - Modified loaddata --ignorenonexistent to ignore models.
2014-05-18 15:52:07 -04:00
Erik Romijn
424fe76349
Fixed #22579 -- Corrected validation for email to reject trailing slash
...
Thanks to Claude Paroz for the report and patch and Tomasz
Paczkowski for the review.
2014-05-16 15:13:11 +02:00
Claude Paroz
f5d4b45df1
Fixed #21634 -- Prevented hiding ImproperlyConfigured when command not found
...
Thanks nikolay.v.golub@gmail.com for the report.
2014-05-16 12:08:31 +02:00
Claude Paroz
e520a73eee
Harmonized some PEP 0263 coding preambles
2014-05-15 19:58:41 +02:00
Aymeric Augustin
3800f63721
Dropped fix_IE_for_vary/attach.
...
This is a security fix. Disclosure following shortly.
2014-05-14 10:19:48 +02:00
Ramiro Morales
a9b7f31bfc
Completed long overdue sqlinitialdata deprecation.
2014-05-11 23:15:59 -03:00
Rainer Koirikivi
a75324c654
Fixed #14226 -- Dependency calculation for complex M2M relations.
...
`sort_dependencies` incorrectly interpreted 'complex' M2M relations
(with explicit through models) as dependencies for a model. This caused
circular complex M2M relations to be unserializable by dumpdata.
Thanks to aneil for the report and outofculture for initial tests.
2014-05-11 19:50:01 -03:00
Malcolm Box
66880e4cd1
Fixed #22606 -- Locmemcache has_key() failed for infinite cache expiry
...
Refactored cache expiry logic for Locmemcache to make consistent across
all places where accessed, and correctly handle None as expiry time.
2014-05-09 18:35:07 +02:00
David Szotten
7fe60ae64a
Fixed #22588 -- Fix RegexValidator __eq__
...
Compare parameters instead of re.pattern instances, and add the other
parameters to the comparison. Also add a __ne__ to make assertNotEqual
work properly.
2014-05-08 19:51:15 -07:00
Claude Paroz
fc32e9c0d9
Removed unused imports in makemigrations
2014-05-08 19:39:43 +02:00
Andrew Godwin
f9d7e18dc5
Fixed #22576 : Ensure makemigrations doesn't touch the database.
2014-05-06 22:41:59 -07:00
Andrew Godwin
6944418277
Fixed #22337 : FileSystemStorage marked as deconstructible and tested.
2014-05-06 22:23:23 -07:00
Loic Bistuer
d1799233f4
Fixed clash caused by the newly introduced -e shorthand for makemessages --exclude.
...
This fixes a regression caused by 0707b82
. Refs #22328 .
2014-05-02 23:07:17 +07:00
Andrew Godwin
e049c88603
Cleanup failing test w/contenttypes and remove useless graph load
2014-04-30 15:11:52 -07:00
Andrew Godwin
8f6dff372b
Fixed #22485 : Include all unmigrated apps in project state by default.
2014-04-30 12:25:12 -07:00
Tim Graham
d9c272b22f
Removed unused import.
2014-04-30 07:23:39 -04:00
Bruno Ribeiro da Silva
83413c53d2
Fixed #22511 -- Added args to migrations management commands.
2014-04-30 07:15:03 -04:00
Ramiro Morales
2df7238512
Removed bogus, ineffective 'U' flag from codecs.open() call.
2014-04-29 07:46:54 -03:00
Aymeric Augustin
8b5b199e20
Fixed #3214 -- Stopped parsing SQL with regex.
...
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.
Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.
sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.
Many people contributed to both tickets, thank you all, and especially
Claude for the review.
Refs #22401 .
2014-04-26 17:46:23 +02:00
Ana Krivokapic
0707b824fe
Fixed #22328 -- Added --exclude option to compilemessages and makemessages.
2014-04-26 17:07:44 +07:00
Kevin Christopher Henry
91afc00513
Fixed #21157 -- Fixed problems with ResolverMatch
...
- Fixed bug in get_callable() that caused resolve() to put a string
in ResolverMatch.func.
- Made ResolverMatch.url_name match the actual url name (or None).
- Updated tests that used the string value in ResolverMatch.func, and
added regression tests for this bug.
- Corrected test urls whose dummy view paths caused failures (behavior
that was previously masked by this bug).
2014-04-23 20:12:34 -04:00
Claude Paroz
3a435a057c
Set compile messages options as class variable
...
Refs #18714 . Same logic as options for makemessages commands.
2014-04-23 15:15:03 +02:00
Malcolm Box
af5f688392
Fixed #22495 -- Locmem cache.add() failed with infinite timeouts
...
cache.add() incorrectly succeeded when there was an existing key
with an infinite (None) timeout.
2014-04-23 14:49:46 +02:00
Preston Timmons
3c06b2f2a3
Fixed #22486 -- Restored the ability to reverse views created using functools.partial.
...
Regression in 8b93b31487
.
Thanks rcoup for the report.
2014-04-23 07:27:52 -04:00
Tim Graham
8b93b31487
Fixed a remote code execution vulnerabilty in URL reversing.
...
Thanks Benjamin Bach for the report and initial patch.
This is a security fix; disclosure to follow shortly.
2014-04-21 18:11:26 -04:00
Florian Apolloner
405b13fe83
Fixed migrate when called inside a transaction.
...
This is useful for tests manually calling migrate inside a testcase,
for normal usage this should make no difference, since there is no
surrounding transaction after all. If there is one we still try to
leave the transaction in a useable state (for postgres at least).
If this commit turns out to be causing issues, settings savepoint=False
is probably the right fix :)
2014-04-21 15:37:12 +02:00
Aymeric Augustin
428c0bbe1b
Appeased flake8 2.1.0.
2014-04-21 12:27:34 +02:00
Claude Paroz
275811a93c
Adapted fixture read mode to file type
...
Binary mode added in ed532a6a1e
is not supported by ZipFile.
Refs #22399 .
2014-04-18 18:54:46 +02:00
Claude Paroz
ed532a6a1e
Fixed #22399 -- Forced fixture reading in binary mode
...
This might help on systems where default encoding is not UTF-8 (and
on Python 3).
Thanks bacilla for the report.
2014-04-18 17:55:35 +02:00
Moayad Mardini
214d1e1b0f
Fixed #22454 - Changed compatibility warning hint
...
The warning hint of `_check_test_runner` of 1.6 compatibility had a link
to a general release note. The link should be edited to refer the
relevant "Backwards incompatible changes in 1.6" section that documents
the cause and the possible solutions and workarounds of the warning.
2014-04-17 20:41:25 -04:00
Tim Graham
47927eb786
Revert "Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse."
...
This reverts commit 071c933775
.
This introduced a regression on MySQL and custom SQL is deprecated.
2014-04-16 21:03:22 -04:00
Tim Graham
395d75ea6b
Fixed #22194 -- Added --list-tags option to check command.
...
Thanks Elvard for the patch.
2014-04-10 09:43:55 -04:00
Tim Graham
b513fa5fc6
Fixed #22195 -- Used constants to define built-in tags for check framework.
...
Thanks Elvard for the patch.
2014-04-10 08:45:48 -04:00
julien 'pouete' Godin
071c933775
Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse.
2014-04-09 19:25:07 -04:00
Daniel Neuhäuser
4aa80149e7
Fixed #22327 -- Turned BaseEmailBackend into a context manager
...
Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.
2014-03-31 14:08:51 -04:00
Ramiro Morales
9a982d5ccc
Moved ServerHandler helper class to tests.
...
It has been only used in the builtin_servers tests since Django 1.4.
2014-03-30 20:55:40 -03:00
Alex Gaynor
778ce245dd
Corrected many style guide violations that the newest version of flake8 catches
2014-03-30 12:11:05 -07:00
Zbigniew Siciarz
3cdb0baa45
Fixed #22335 -- Fixed popen_wrapper error on non-English Windows systems.
2014-03-26 00:42:19 +01:00
Tim Graham
9b7ba8af1b
Fixed #22322 -- Fixed incorrect explanation of what managed=False does.
...
refs #14305 .
Thanks Adrian Klaver for the report.
2014-03-25 14:01:37 -04:00
Tim Graham
e3c4205b79
flake8 and doc fixes for refs #22257 .
2014-03-25 09:44:59 -04:00
Anubhav Joshi
f34e8fc890
Fixed #22257 -- Added file output option to dumpdata command.
2014-03-25 13:47:03 +05:30
Baptiste Mispelon
96fc3908ad
Fixed a failing test introduced in 918a16bc4c
.
...
Refs #22307 .
2014-03-22 18:05:56 +01:00
Patrick Michaud
acee46fc95
Fixed #22256 -- Replaced bad fallback for missing PATH
...
Thanks Baptiste Mispelon for the review.
2014-03-22 16:52:05 +01:00
Aymeric Augustin
6877a9d415
Avoided transactional truncates on amateur databases.
...
Fixed a test failure that appeared after 753a22a6
, although the bug
existed before that commit.
Refs #22308 .
2014-03-22 14:39:27 +01:00
Aymeric Augustin
0757e0f30d
Avoided transactional DDL on castrated databases.
...
Fixed a test failure that appeared after 753a22a6
, although the bug
existed before that commit.
Refs #22308 .
2014-03-22 11:05:14 +01:00
Hans Lawrenz
918a16bc4c
Fixed #22307 -- Fixed SpooledTemporaryFile bug in File class.
...
Added condition to prevent checking the existence of a file name of a
file like object when the name attribute is None. This is necessary
because a SpooledTemporaryFile won't exist on the file system or have a
name until it has reached its max_size. Also added tests.
2014-03-21 22:34:47 +01:00
Aymeric Augustin
753a22a635
Fixed transaction handling in two management commands.
...
Previously, when createcachetable and flush operated on non-default
databases, they weren't atomic.
2014-03-21 21:29:51 +01:00
Aymeric Augustin
0f9560855e
Removed legacy transaction management per the deprecation timeline.
2014-03-21 21:06:50 +01:00
Tim Graham
4965a77407
Removed PIL compatability layer per deprecation timeline.
...
refs #19934 .
2014-03-21 10:54:53 -04:00
Dejan Noveski
4d0c5f6142
Fixed #22255 -- Added support for specifying re flags in RegexValidator
2014-03-21 11:12:36 +01:00
smallcode
61fdb8d487
Fixed regression in file locking on some platforms.
...
Some platforms with os.name == 'posix' do not have the
fcntl module, e.g. AppEngine.
refs #19373 .
2014-03-18 10:35:22 -04:00
Daniel Hahler
fc167c9b5e
Mentioned that ``dumpdata --natural`` is deprecated.
2014-03-18 07:25:37 -04:00
Andrew Godwin
28779abb75
Fix bad conflict detection during makemigrations
2014-03-08 13:53:20 -08:00
Claude Paroz
210d0489c5
Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
...
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Claude Paroz
06efeae598
Added --previous flag to msgmerge command used by makemessages
...
Also took the opportunity to slightly refactor gettext options
so as to ease customization by subclassing the command.
Thanks Michal Čihař for the report and initial patch.
2014-03-06 10:20:01 +01:00
Athena
5d568bcfa6
Fixed #7571 -- Fixed parameter matching in include()'d urlpattern
...
Fixed URL resolving in the case where an outer regex includes an inner
regex and both regexes use positional parameters instead of named
groups, causing the outer regex's parameters to override the inner
regex's.
Modified the regex url resolver so that it will concatenates and then
normalizes, instead of normalizing and then concatenating.
2014-03-05 00:35:03 +01:00
zedr
6fe22b30e0
Fixed #22085 -- Added a feature for setting non-expiring keys as the default.
...
This feature allows the default `TIMEOUT` Cache argument to be set to `None`,
so that cache instances can set a non-expiring key as the default,
instead of using the default value of 5 minutes.
Previously, this was possible only by passing `None` as an argument to
the set() method of objects of type `BaseCache` (and subtypes).
2014-03-04 21:16:35 +01:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
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