Tim Graham
f0a1df0b01
Removed deprecated Chinese language codes; refs #18149 .
2015-01-17 11:23:43 -05:00
Tim Graham
4aa089a9a9
Removed support for custom SQL per deprecation timeline.
2015-01-17 10:16:06 -05:00
Collin Anderson
a420f83e7d
Fixed #24055 -- Keep reference to view class for resolve()
2015-01-17 22:09:10 +07:00
Tim Graham
67235fd4ef
Removed support for initial_data fixtures per deprecation timeline.
2015-01-17 09:59:25 -05:00
Tim Graham
f635d75935
Removed support for old-style test database settings per deprecation timeline.
2015-01-17 09:55:18 -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
1b0365ad34
Removed django.utils.tzinfo per deprecation timeline; refs #17262 .
2015-01-17 09:32:33 -05:00
Tim Graham
fed25f1105
Removed compatibility with Python 3.2.
2015-01-17 09:00:17 -05:00
Tim Graham
c820892eed
Removed django.utils.datastructures.SortedDict per deprecation timeline.
2015-01-17 08:40:23 -05:00
Tim Graham
41f0d3d3bc
Removed FastCGI support per deprecation timeline; refs #20766 .
2015-01-17 08:32:31 -05:00
Tim Graham
37b7776a01
Removed django.utils.datastructures.MergeDict per deprecation timeline; refs #18659 .
2015-01-17 08:13:36 -05:00
Tim Graham
75f107b884
Removed request.REQUEST per deprecation timeline; refs #18659 .
2015-01-17 08:05:18 -05:00
Tim Graham
61ad1ea92b
Removed django.utils.functional.memoize per deprecation timeline.
...
refs #21351 .
2015-01-17 07:55:32 -05:00
Tim Graham
9ce36512fa
Removed backwards compatibility shims for "util" modules per deprecation timeline.
...
refs #17627 .
2015-01-17 07:40:12 -05:00
Tim Graham
b952c3fc60
Removed django.utils.unittest per deprecation timeline.
2015-01-17 07:32:22 -05:00
Tim Graham
ce78b954cf
Removed django.utils.importlib per deprecation timeline.
2015-01-17 07:14:21 -05:00
Tim Graham
1c8b637ed9
Removed django.utils.dictconfig per deprecation timeline.
2015-01-17 07:13:51 -05:00
Marc Tamlyn
39d95fb6ad
Fixed #24092 -- Widened base field support for ArrayField.
...
Several issues resolved here, following from a report that a base_field
of GenericIpAddressField was failing.
We were using get_prep_value instead of get_db_prep_value in ArrayField
which was bypassing any extra modifications to the value being made in
the base field's get_db_prep_value. Changing this broke datetime
support, so the postgres backend has gained the relevant operation
methods to send dates/times/datetimes directly to the db backend instead
of casting them to strings. Similarly, a new database feature has been
added allowing the uuid to be passed directly to the backend, as we do
with timedeltas.
On the other side, psycopg2 expects an Inet() instance for IP address
fields, so we add a value_to_db_ipaddress method to wrap the strings on
postgres. We also have to manually add a database adapter to psycopg2,
as we do not wish to use the built in adapter which would turn
everything into Inet() instances.
Thanks to smclenithan for the report.
2015-01-16 16:15:16 -05:00
Collin Anderson
e8171daf0c
Fixed #24146 -- Fixed a missing fields regression in admin checks.
...
This allows using get_field() early in the app loading process.
Thanks to PirosB3 and Tim Graham.
2015-01-16 14:47:09 -05:00
Claude Paroz
b4ac232907
Fixed #24099 -- Removed contenttype.name deprecated field
...
This finsishes the work started on #16803 .
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
2015-01-16 20:21:34 +01:00
Collin Anderson
5338ff4808
Fixed #24160 -- Fixed model_regress test on Windows; refs #24007 .
2015-01-16 11:59:08 -05:00
Tim Graham
28db4af80a
Fixed #24135 -- Made RenameModel rename many-to-many tables.
...
Thanks Simon and Markus for reviews.
2015-01-15 20:34:33 -05:00
Yang Liu
3f9ec12d9c
Fixed #23712 -- Fixed KeyError with BaseForm._html_output()
2015-01-15 20:19:53 -05:00
Collin Anderson
faf0d66a80
Fixed #23850 -- Fixed a migrations test failure on Mac OS X & Python 3
2015-01-15 19:45:43 -05:00
Michał Modzelewski
39b58ad95a
Fixed #24148 -- Documented a bug with case expressions in SQLite < 3.7.0
2015-01-15 19:42:05 -05:00
Collin Anderson
67dbc56ec8
Made an expressions_case test work without Pillow.
2015-01-15 14:02:58 -05:00
Tim Graham
9801d419b9
Skipped a problematic file_storage test on Windows.
2015-01-14 15:00:27 -05:00
Collin Anderson
2d5da57f48
Fixed incorrect error message in Options.get_fields()
2015-01-14 14:51:05 -05:00
Tim Graham
28308078f3
Fixed #22603 -- Reorganized classes in django.db.backends.
2015-01-14 14:16:20 -05:00
Tim Graham
a6f144fd4f
Fixed a static view test on Windows.
2015-01-14 13:56:49 -05:00
Markus Holtermann
88786afbff
Fixed #24147 -- Prevented managers leaking model during migrations
...
Thanks Tim Graham for the review.
2015-01-14 16:09:33 +01:00
Tim Graham
baf2542c4f
Fixed DoS possibility in ModelMultipleChoiceField.
...
This is a security fix. Disclosure following shortly.
Thanks Keryn Knight for the report and initial patch.
2015-01-13 13:03:06 -05:00
Tim Graham
a3bebfdc34
Ensured views.static.serve() doesn't use large memory on large files.
...
This issue was fixed in master by refs #24072 .
2015-01-13 13:03:06 -05:00
Tim Graham
69b5e66738
Fixed is_safe_url() to handle leading whitespace.
...
This is a security fix. Disclosure following shortly.
2015-01-13 13:03:06 -05: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
Michał Modzelewski
65246de7b1
Fixed #24031 -- Added CASE expressions to the ORM.
2015-01-12 18:15:34 -05:00
Josh Smeaton
21b858cb67
Fixed #24060 -- Added OrderBy Expressions
2015-01-13 09:39:55 +11:00
Claude Paroz
f48e2258a9
Fixed #24133 -- Replaced formatting syntax in success_url placeholders
...
Thanks Laurent Payot for the report, and Markus Holtermann, Tim Graham
for the reviews.
2015-01-12 22:51:22 +01:00
Aymeric Augustin
5f7230e12f
Fixed #24124 (again) -- Updated tests with new default context_processors.
...
Thanks Collin for the review.
2015-01-12 22:31:44 +01:00
Aymeric Augustin
6b5113ec94
Made debug views not crash when there isn't a default template engine.
2015-01-12 21:01:34 +01:00
Aymeric Augustin
79deb6a071
Accounted for multiple template engines in template responses.
2015-01-12 21:01:34 +01:00
Aymeric Augustin
a3e783fe11
Deprecated passing a Context to a generic Template.render.
...
A deprecation path is required because the return type of
django.template.loader.get_template changed during the
multiple template engines refactor.
test_csrf_token_in_404 was incorrect: it tested the case when the
hardcoded template was rendered, and that template doesn't depend on the
CSRF token. This commit makes it test the case when a custom template is
rendered.
2015-01-12 21:01:34 +01:00
Aymeric Augustin
71b7668b75
Rewrapped TemplateSyntaxError in Jinja2 backend.
...
Changed import style to avoid confusion between Django's and Jinja2's
APIs.
2015-01-12 21:01:34 +01: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
Muthiah Annamalai
b75c707943
Fixed #24089 -- Added check for when ModelAdmin.fieldsets[1]['fields'] isn't a list/tuple.
2015-01-12 13:47:58 -05: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
Tim Graham
9f51d0c86d
Fixed test from refs #23913 when running tests in reverse.
2015-01-12 13:20:44 -05:00
Markus Holtermann
bbbed99f62
Fixed #24123 -- Used all available migrations to generate the initial migration state
...
Thanks Collin Anderson for the input when creating the patch and Tim Graham for the review.
2015-01-12 18:39:18 +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
Marc Tamlyn
b5c1a85b50
Fixed #24118 -- Added --debug-sql option for tests.
...
Added a --debug-sql option for tests and runtests.py which outputs the
SQL logger for failing tests. When combined with --verbosity=2, it also
outputs the SQL for passing tests.
Thanks to Berker, Tim, Markus, Shai, Josh and Anssi for review and
discussion.
2015-01-12 08:16:08 +00:00
Claude Paroz
68a439a18d
Removed supports_binary_field flag as all backends support them
...
It was mainly for MySQL on Python 3, but now the current
recommended MySQL driver for Python 3 (mysqlclient) does support
binary fields, it is unneeded. Refs #20377 .
2015-01-11 23:34:47 +01:00
Ola Sitarska
d563e3be68
Fixed #23913 -- Deprecated the `=` comparison in `if` template tag.
2015-01-11 15:21:01 -05:00
Claude Paroz
412066e71e
Revert "Marked a test as an expected failure on MySQL and Python 3.2."
...
This reverts commit 832b4a5722
.
We officially don't support MySQL on Python 3.2. Refs #20380 .
2015-01-11 20:59:07 +01:00
Markus Holtermann
fdc2cc9487
Fixed #24110 -- Rewrote migration unapply to preserve intermediate states
2015-01-10 23:14:15 +01:00
Simon Charette
07988744b3
Fixed #13165 -- Added edit and delete links to admin foreign key widgets.
...
Thanks to Collin Anderson for the review and suggestions and Tim for the
final review.
2015-01-10 12:24:52 -05:00
Marc Tamlyn
48ad288679
Fixed #24001 -- Added range fields for PostgreSQL.
...
Added support for PostgreSQL range types to contrib.postgres.
- 5 new model fields
- 4 new form fields
- New validators
- Uses psycopg2's range type implementation in python
2015-01-10 16:18:19 +00:00
Claude Paroz
7289d01973
Introspected alternate SQLite FK definitions
2015-01-10 16:51:14 +01:00
Claude Paroz
ffca9b49d4
Updated introspection test to use skipUnlessDBFeature
2015-01-10 15:42:31 +01:00
Claude Paroz
d7bc37d611
Fixed #24097 -- Prevented AttributeError in redirect_to_login
...
Thanks Peter Schmidt for the report and the initial patch.
Thanks to Oktay Sancak for writing the original failing test and
Alvin Savoy for supporting contributing back to the community.
2015-01-10 10:05:02 +01:00
Loic Bistuer
8f4877c89d
Fixed #22583 -- Allowed RunPython and RunSQL to provide hints to the db router.
...
Thanks Markus Holtermann and Tim Graham for the review.
2015-01-10 00:30:48 +07:00
Preston Timmons
665e0aa6ec
Fixed #24094 -- Enabled template tests to run individually.
2015-01-09 11:43:59 -05:00
Markus Holtermann
c8bac4b556
Fixed #24098 -- Added no-op attributes to RunPython and RunSQL
...
Thanks Loïc Bistuer and Tim Graham for the discussion and review.
2015-01-09 10:31:32 -05:00
Anssi Kääriäinen
0c7633178f
Fixed #24020 -- Refactored SQL compiler to use expressions
...
Refactored compiler SELECT, GROUP BY and ORDER BY generation.
While there, also refactored select_related() implementation
(get_cached_row() and get_klass_info() are now gone!).
Made get_db_converters() method work on expressions instead of
internal_type. This allows the backend converters to target
specific expressions if need be.
Added query.context, this can be used to set per-query state.
Also changed the signature of database converters. They now accept
context as an argument.
2015-01-08 14:07:54 -05:00
Tim Graham
b8abfe141b
Fixed #24101 -- Fixed flaky admin_views selenium tests; refs #7361 .
2015-01-08 13:17:00 -05:00
Tim Graham
5c43fd4825
Isolated some cache tests; refs #23947 .
...
This reverts a change made in 40c60efecc
which was incorrect and caused CacheKeyWarnings.
2015-01-08 13:14:45 -05:00
Claude Paroz
543df07720
Fixed #24073 -- Returned None for get_language when translations are deactivated
...
This fixes a regression caused by f7c287fca9
. Thanks Markus Holtermann
for identifying the regression.
2015-01-08 17:43:07 +01:00
Tim Graham
ade9859996
Fixed #24095 -- Prevented WarningLoggerTests from leaking a warnings filter.
2015-01-08 08:49:54 -05:00
Markus Holtermann
862ea825b5
Fixed #24093 -- Prevented MigrationWriter to write operation kwargs that are not explicitly deconstructed
2015-01-07 17:29:20 -07:00
Tim Graham
f487a3275e
Avoided a deprecated alias on Python 3 in file_uploads test.
2015-01-07 19:12:37 -05:00
Josh Smeaton
8713ea7568
Fixed null handling in Value expression
2015-01-07 19:07:49 -05:00
Markus Holtermann
1f03d2d924
Refs #23822 -- Made MigrationOptimizer aware of model managers
2015-01-07 17:33:04 -05:00
Aymeric Augustin
127f9e073d
Restored support for multiple template names in render(_to_response).
...
This possibility was documented but not tested.
It had been broken during the multiple template engines refactor.
2015-01-07 21:54:22 +01:00
Aymeric Augustin
eaa1a22341
Added a request argument to render_to_string.
...
This is for consistency with Template.render.
It adds a little bit of knowledge about HTTP requests in
django.template.loader but I think consistency trumps purity.
2015-01-07 21:54:22 +01: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
Michał Modzelewski
ee86e59051
Refs #2443 -- Allowed creation of objects with NULL DurationFields
2015-01-07 08:33:26 -05:00
Josh Smeaton
5a4ac4ead9
Fixed #24078 -- Removed empty strings from GenericIPAddressField
2015-01-07 08:08:36 -05: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
Tim Graham
749d23251b
Removed warning handling that should have been removed in refs #23891 .
2015-01-06 18:33:55 -05:00
Aymeric Augustin
0cdb09d489
Made context take priority over context processors.
...
This is the expected behavior, but given RequestContext's tortuous
implementation, a straightforward use of its API results in the
opposite.
This commits fixes a regression that must have happened at different
points in the multiple templates engine refactor for different features.
2015-01-06 22:02:27 +01: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
011f21b4fa
Used None-related assertions in CSRF tests
...
Thanks Markus Holtermann for spotting this.
2015-01-06 08:48:01 +01:00
Claude Paroz
27dd7e7271
Fixed #23815 -- Prevented UnicodeDecodeError in CSRF middleware
...
Thanks codeitloadit for the report, living180 for investigations
and Tim Graham for the review.
2015-01-06 08:42:58 +01:00
Preston Timmons
de9ebdd39c
Fixed #24022 -- Deprecated the ssi tag.
2015-01-05 19:35:02 -05: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
Tim Graham
789baf9c3a
Fixed test failures introduced in refs #23861 .
2015-01-05 14:35:30 -05:00
Tim Graham
c87ee41954
Fixed #23861 -- Added an API to deprecate model fields.
...
Thanks Markus Holterman and Berker Peksag for review.
2015-01-05 11:35:36 -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
Andriy Sokolovskiy
23f1a8dad2
Added return value to Signal.disconnect().
2015-01-02 12:00:41 -05:00
Tim Graham
937fab030d
Renamed an assertion in the dispatch tests.
2015-01-02 11:29:06 -05:00
Daniel Pyrathon
8958170755
Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions
2015-01-02 10:46:04 -05:00
Claude Paroz
1aa3e09c20
Fixed #23745 -- Reused states as much as possible in migrations
...
Thanks Tim Graham and Markus Holtermann for the reviews.
2015-01-02 15:37:10 +01:00
Claude Paroz
2a9c4b4901
Passed around the state between migrations
...
Refs #23745 .
2015-01-02 15:37:10 +01:00
Claude Paroz
a159b1facd
Replaced migration state render() by apps cached property
...
Refs #23745 .
2015-01-02 15:19:36 +01:00
Tim Graham
40ccef16cb
Silenced an ImportWarning in the template_backends tests.
2015-01-01 14:28:53 -05:00
Tim Graham
b9feec959b
Fixed #23700 -- Fixed non-deterministic static files test failures on Windows.
...
This partially reverts commit 949ee521fa
refs #21230 .
2015-01-01 13:57:52 -05:00
Tim Graham
40a8504357
Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.
...
Thanks Markus Holtermann for review.
2015-01-01 13:30:52 -05:00
Thomas Tanner
46068d850d
Fixed #22295 -- Replaced permission check for displaying admin user-tools
2014-12-31 16:31:59 -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