Commit Graph

6498 Commits

Author SHA1 Message Date
Preston Timmons 23c4cbc0fa Cleaned up formatting in template_tests.test_custom. 2015-02-04 09:47:24 -05:00
Anssi Kääriäinen 7145c8a62a Removed EverythingNode
At the same time, made sure that empty nodes in where clause match
everything.
2015-02-04 09:26:40 -05:00
Riccardo Magliocchetti 2be621e44c Fixed #14497 -- Improved admin widget for "read only" FileFields
Based on patch by Adam J Forster, Paul Collins, and Julien.
2015-02-04 09:05:23 -05:00
Josh Schneier 7d363ed432 Fixed typos of "select_related" in docs and tests. 2015-02-04 07:31:43 -05:00
Aron Podrigal 79f27f2b61 Fixed #15321 -- Honored ancestors unique checks.
Thanks to Tim for the review.
2015-02-03 18:56:53 -05:00
Tim Graham 1fc458b5a3 Removed a useless check in runtests.py
Added in 3e97535907, this check
appears to never be triggered today.
2015-02-03 18:32:00 -05:00
Tim Graham c0cc8f69e7 Refactored tests that rely on an ImportError for Python 3.5 compatibility
A change in Python test discovery [1] causes the old packages that raised
an error to be discovered; now we use a common directory that's
ignored during discovery. Refs #23763.

[1] http://bugs.python.org/issue7559
2015-02-03 18:30:46 -05:00
Simon Charette 65e005f8cd Fixed #24266 -- Changed get_parent_list to return a list ordered by MRO.
Thanks to Aron Podrigal for the initial patch and Tim for the review.
2015-02-03 16:40:31 -05:00
Tim Graham 0e489c19f1 Reverted "Fixed #24146 -- Fixed a missing fields regression in admin checks."
This reverts commit e8171daf0c.

A new solution is forthcoming.
2015-02-03 15:23:39 -05:00
darkryder 9ec8aa5e5d Fixed #24149 -- Normalized tuple settings to lists. 2015-02-03 14:59:45 -05:00
Claude Paroz cd0ceaa102 Fixed #24252 -- Forced lazy __str__ to utf-8 on Python 2
Thanks Stanislas Guerra for the report and Tomas Ehrlich for
the review.
2015-02-03 18:23:41 +01:00
Matthew Somerville 250aa7c39b Fixed #24240 -- Allowed GZipping a Unicode StreamingHttpResponse
make_bytes() assumed that if the Content-Encoding header is set, then
everything had already been dealt with bytes-wise, but in a streaming
situation this was not necessarily the case.

make_bytes() is only called when necessary when working with a
StreamingHttpResponse iterable, but by that point the middleware has
added the Content-Encoding header and thus make_bytes() tried to call
bytes(value) (and dies). If it had been a normal HttpResponse,
make_bytes() would have been called when the content was set, well
before the middleware set the Content-Encoding header.

This commit removes the special casing when Content-Encoding is set,
allowing unicode strings to be encoded during the iteration before they
are e.g. gzipped. This behaviour was added a long time ago for #4969 and
it doesn't appear to be necessary any more, as everything is correctly
made into bytes at the appropriate places.

Two new tests, to show that supplying non-ASCII characters to a
StreamingHttpResponse works fine normally, and when passed through the
GZip middleware (the latter dies without the change to make_bytes()).
Removes the test with a nonsense Content-Encoding and Unicode input - if
this were to happen, it can still be encoded as bytes fine.
2015-02-03 18:18:12 +01:00
Preston Timmons cd4282816d Fixed #18651 -- Enabled optional assignments for simple_tag(). 2015-02-03 10:44:33 -05:00
Anssi Kääriäinen 8adc59038c Fixed #23617 -- Added get_pk_value_on_save()
The method is mainly intended for use with UUIDField. For UUIDField we
want to call the field's default even when primary key value is
explicitly set to None to match the behavior of AutoField.

Thanks to Marc Tamlyn and Tim Graham for review.
2015-02-03 09:23:44 -05:00
Tim Graham 118b11221f Fixed #24263 -- Prevented extra queries on BaseDateDetailView with a custom queryset.
Thanks jekka-ua for the report and patch.
2015-02-03 09:12:37 -05:00
Aymeric Augustin 2133f3157e Fixed #24168 -- Allowed selecting a template engine in a few APIs.
Specifically in rendering shortcuts, template responses, and class-based
views that return template responses.

Also added a test for render_to_response(status=...) which was missing
from fdbfc980.

Thanks Tim and Carl for the review.
2015-02-03 08:29:45 +01:00
Tim Graham 62df1834b8 Fixed expressions test on Python 3.5; refs #23763. 2015-01-31 19:59:17 -05:00
Tim Graham 75303b01a9 Fixed #24245 -- Added introspection for database defaults.
Needed for tests for migrations handling of database defaults.
2015-01-31 12:33:11 -05:00
Tim Graham 293fd5da5b Reverted "Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows."
This reverts commit da79ccca1d.

This optimized the unsuccessful case at the expense of the successful one.
2015-01-30 12:51:12 -05:00
Loic Bistuer 4c3bfe9053 Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
2015-01-30 22:02:58 +07:00
Samuel Colvin 5b74134f27 Fixed #24145 -- Added PUT & PATCH to CommonMiddleware APPEND_SLASH redirect error. 2015-01-29 15:23:01 -05:00
Simon Charette eb4cdfbdd6 Fixed #23940 -- Allowed model fields to be named `exact`.
An explicit `__exact` lookup in the related managers filters
was interpreted as a reference to a foreign `exact` field.

Thanks to Trac alias zhiyajun11 for the report, Josh for the investigation,
Loïc for the test name and Tim for the review.
2015-01-29 14:40:20 -05:00
Tim Graham 18f3e79b13 Removed threading fallback imports.
Django imports threading in many other places without fallback.
2015-01-28 10:23:25 -05:00
Tim Graham cd91486213 Fixed flake8 warning. 2015-01-28 07:00:52 -05:00
Jon Dufresne 24b2bc635e Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib. 2015-01-28 06:59:40 -05:00
Josh Smeaton 7171bf755b Refs #14030 -- Added repr methods to all expressions 2015-01-28 10:59:30 +11:00
Josh Smeaton f218a2ff45 Refs #24060 -- Added a test demonstrating reverse order isn't mutable 2015-01-28 10:59:30 +11:00
Raul Cumplido ac650d02cb Fixed #24209 -- Prevented crash when parsing malformed RFC 2231 headers
Thanks Tom Christie for the report and review.
2015-01-27 20:12:22 +01:00
Loic Bistuer 728b6fd9ca Fixed #24219 -- Moved SelectDateWidget together with the other widgets
and deprecated django.forms.extras.

Thanks Berker Peksag and Tim Graham for the reviews.
2015-01-27 22:40:02 +07:00
Loic Bistuer 3a4c9e1b43 Cleaned up some forms tests.
Thanks Berker Peksag and Tim Graham for the reviews. Refs #24219.
2015-01-27 22:39:57 +07:00
Josh Smeaton 8196e4bdf4 Fixed #24154 -- Backends can now check support for expressions 2015-01-27 12:20:06 +11:00
Tomáš Ehrlich 511be35779 Fixed #24220 - Allowed lazy objects for success_url 2015-01-26 17:58:55 +01:00
Tim Graham 0386b97706 Fixed test_runner test failure on Python 3.5; refs #23763.
Python change is http://bugs.python.org/issue22032
2015-01-23 16:23:32 -05:00
Claude Paroz f8e4e4a935 Fixed warning leak in static.serve() test
Partial forward port of b1bf8d64fb from 1.7.x. Refs #24193.
2015-01-23 09:09:48 +01:00
Ng Zhi An 4669b6a807 Fixed #24170 -- Implemented decompress for BaseRangeField widgets 2015-01-22 19:36:15 +00:00
Andriy Sokolovskiy 38c17871bb Fixed #24104 -- Fixed check to look on field.many_to_many instead of class instance 2015-01-22 18:41:19 +01:00
Loic Bistuer d450af8a26 Fixed small inconsistency when handling aggregate's default_alias.
Refs #14030.
2015-01-22 00:44:14 +07:00
Adam Taylor 039465a6a7 Fixed typos in code comments. 2015-01-20 12:18:03 -05:00
Markus Holtermann 64ecb3f07d Refs #24163 -- Fixed failing Oracle test when migrating from ForeignKey to OneToOneField
Thanks Tim Graham for review
2015-01-20 16:19:11 +01:00
Marc Tamlyn 0ae94d0d31 Fixes #24169 -- More arrayfield specific lookups.
varchar()[] cannot compare itself to text[]

Thanks to joelburton for the patch.
2015-01-20 09:52:23 +00:00
Josh Smeaton 61c102d010 Fixed #24183 -- Fixed wrong comparisons in Substr 2015-01-20 12:09:15 +11:00
Markus Holtermann 7f20041bca Fixed #24155 -- Maintained kwargs and import order in migration writer
Thanks Tomas Dobrovolny for the report and Tim Graham for the review.
2015-01-20 01:24:41 +01:00
Tim Graham b19b81b396 Fixed #24153 -- Fixed cookie test compatibility with Python 3.4.3+ 2015-01-19 15:12:57 -05:00
Tim Graham 378a0d27d6 Advanced deprecation warnings for Django 1.9. 2015-01-19 12:22:41 -05:00
Tim Graham 33457cd3b0 Removed IPAddressField per deprecation timeline; refs #20439. 2015-01-19 11:12:57 -05:00
Markus Holtermann 5792e6a88c Fixed #24163 -- Removed unique constraint after index on MySQL
Thanks Łukasz Harasimowicz for the report.
2015-01-19 16:52:26 +01:00
Josh Smeaton 69c6a6868f Fixed #24174 -- Fixed extra order by descending 2015-01-19 12:51:27 +11:00
Tim Graham 2fa2068406 Removed an unused import and a flake8 exclude that caused it to be missed. 2015-01-18 20:02:15 -05:00
Tim Graham b84100e8e2 Removed usage of deprecated removetags in a template test. 2015-01-18 18:32:47 -05:00
Tim Graham 6e13c0490d Changed RedirectView.permanent to False per deprecation timeline; refs #21587. 2015-01-18 17:43:06 -05:00
Tim Graham 2b039d966f Removed obsolete SQL generation methods. 2015-01-18 15:58:06 -05: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 67a76500a5 Removed support for admin validators per deprecation timeline; refs #16905. 2015-01-18 14:43:21 -05:00
Tim Graham 2cd00424c4 Removed support for callable QuerySet arguments per deprecation timeline; refs #11629. 2015-01-18 14:01:25 -05:00
Tim Graham d029fafea1 Removed utils.module_loading.import_by_path() per deprecation timeline; refs #21674. 2015-01-18 12:51:15 -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 8d959f73be Removed obsolete deprecation warning in runtests.py 2015-01-17 19:41:46 -05:00
Tim Graham 0622bca5d1 Removed the validate management command per deprecation timeline. 2015-01-17 19:12:03 -05:00
Tim Graham 714277cb4c Removed support for SplitDateTimeWidget with DateTimeField per deprecation timeline.
refs #8898
2015-01-17 18:49:44 -05:00
Tim Graham 2c9e95639e Removed ModelAdmin.get_formsets() per deprecation timeline; refs #20702. 2015-01-17 18:02:35 -05:00
Tim Graham 3b570dbcdb Removed BaseDatabaseValidation.validate_field() per deprecation timeline. 2015-01-17 14:58:09 -05:00
Markus Holtermann 65d55c4093 Cleaned up migration writer tests 2015-01-17 20:29:50 +01:00
Tim Graham bd93032191 Removed ssi/url tags from future per deprecation timeline; refs #21939. 2015-01-17 13:29:52 -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 df3f3bbe29 Removed utils.text.javascript_quote() per deprecation timeline; refs #21725. 2015-01-17 12:41:49 -05:00
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