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
511a53b314
Avoided exceptions in admindocs' template detail view.
...
This is marginally better than crashing when several Django template
engines are configured in a project.
Refs #24125 .
2015-01-12 21:01:34 +01:00
Aymeric Augustin
3bba4b420e
Avoided exceptions in a non-critical check in the admin.
...
This change makes it possible to configure several Django template
engines in a project and still use the admin. On the flip side the
check is silently skipped when no Django template engine is configured.
2015-01-12 21:01:34 +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
Collin Anderson
26a92619f6
Fixed #24124 -- Changed context_processors in the default settings.py
2015-01-12 13:17: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
Collin Anderson
58833f5197
Made Django's templates get their own LANGUAGE_* variables.
...
Refs #24117
2015-01-12 10:54:59 -05: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
Markus Holtermann
be158e3625
Refs #24110 -- Added a more descriptive release note and fixed a spelling mistake.
2015-01-11 00:30:47 +01:00
Markus Holtermann
fdc2cc9487
Fixed #24110 -- Rewrote migration unapply to preserve intermediate states
2015-01-10 23:14:15 +01:00
Claude Paroz
b86107ced1
Fixed #24114 -- Improved error message in GEOSGeometry constructor
2015-01-10 18:53:55 +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
Marc Tamlyn
916e38802f
Move % addition to lookups, refactor postgres lookups.
...
These refactorings making overriding some text based lookup names on
other fields (specifically `contains`) much cleaner. It also removes a
bunch of duplication in the contrib.postgres lookups.
2015-01-10 16:18:19 +00:00
Serafeim Papastefanos
74f02557e0
Fixed #23967 -- Added formats for Greek
2015-01-10 11:10:26 -05:00
Claude Paroz
7289d01973
Introspected alternate SQLite FK definitions
2015-01-10 16:51:14 +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
Simon Charette
f2f70faa80
Removed an undocumented contenttypes synchronization method.
2015-01-09 15:58:52 -05:00
Tim Graham
4986653d9d
Fixed a typo in contrib/auth/tests/custom_user.py docstring.
2015-01-09 14:33:04 -05: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
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
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
Claude Paroz
d6c8121ed0
Removed unneeded smart_text calls
...
`verbose_name_raw` return value comes from `force_text()` anyway.
2015-01-08 15:27:13 +01:00
Claude Paroz
de4bfb3fad
Simplified verbose_name_raw property
2015-01-08 15:08:26 +01: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
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
Aymeric Augustin
118592663d
Exposed Engine in the django.template namespace.
...
It's the main entrypoint to the refactored template system.
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
Markus Holtermann
12bf42ae0d
Refs #22608 -- Optimized migration optimizer
...
Moved list constants instantiation into optimizer's __init__.
2015-01-07 08:54:46 -05:00
Ulrich Petri
391bb09bb0
Refs #22608 -- Optimized migration optimizer and migrate by caching calls to str.lower()
2015-01-07 08:54:46 -05: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
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
Aymeric Augustin
ed220c4cbe
Added comments to remove Engine.render_to_string in Django 2.0.
...
Since this is a private API introduced in Django 1.8, no documentation
is required.
2015-01-06 22:02:26 +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
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
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
Collin Anderson
a9aec1154e
Closed files in FileResponse; refs #24072
2015-01-05 14:54:55 -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
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
Markus Holtermann
05f702b94c
Renamed flag for detecting managers built from QuerySets with as_manager().
2015-01-05 10:30:15 -05:00
Claude Paroz
3bac904607
Removed extraneous super call in LiveServerTestCase
...
Refs #21281 . Thanks Tim Graham and Thomas Chaumeny for investigations.
2015-01-03 10:13:20 +01:00
Tim Graham
52f0b2b622
Updated six to 1.9.0.
2015-01-02 12:35:41 -05:00
Andriy Sokolovskiy
839f431ef5
Fixed #24064 -- Prevented database access at compile time in spatialite models.
2015-01-02 12:04:57 -05:00
Andriy Sokolovskiy
23f1a8dad2
Added return value to Signal.disconnect().
2015-01-02 12:00:41 -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
285bd02c92
Show migration elapsed time when verbosity>1
...
This facilitates performance debugging related to migrations.
2015-01-02 15:37:09 +01:00
Markus Holtermann
057305e588
Added ignore_swappable to StateApps
...
Refs #23745 .
2015-01-02 15:37:09 +01:00
Claude Paroz
a159b1facd
Replaced migration state render() by apps cached property
...
Refs #23745 .
2015-01-02 15:19:36 +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
40a8504357
Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.
...
Thanks Markus Holtermann for review.
2015-01-01 13:30:52 -05:00
Tim Graham
b4bdd5262b
Fixed #23366 -- Fixed a crash with the migrate --list command.
2014-12-31 17:26:15 -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
Piotr Pawlaczek
41fc1c0b5e
Fixed #23758 -- Allowed more than 5 levels of subqueries
...
Refactored bump_prefix() to avoid infinite loop and allow more than
than 5 subquires by extending the alphabet to use multi-letters.
2014-12-31 08:48:28 -05:00
Tim Graham
478d6a9503
Copied BaseDatabaseCreation._digest() to SchemaEditor to remove dependency.
...
refs #22340 .
2014-12-31 08:33:34 -05:00
Tim Graham
93d73dac91
Moved DatabaseCreation.data_types properties to DatabaseWrapper.
...
refs #22340 .
2014-12-31 08:29:17 -05:00
Berker Peksag
32ca159c96
Ignored warnings correctly in test_get_formsets_with_inlines_returns_tuples().
...
The subclass check in ModelAdmin.get_formsets_with_inlines() wasn't
tested correctly because of the super() call in
EpisodeAdmin.get_formsets().
2014-12-31 08:24:09 -05:00
Russell Keith-Magee
013c2d8d02
Renamed variables to avoid name collision with import of django.db.models.
2014-12-31 13:21:32 +08:00
Claude Paroz
51890ce889
Applied ignore_warnings to Django tests
2014-12-30 18:16:25 +01:00
Claude Paroz
66f9a74b45
Added ignore_warnings decorator
...
And removed Ignore*DeprecationWarningsMixin, now obsolete.
Thanks Berker Peksag and Tim Graham for the review.
2014-12-30 18:16:25 +01:00
Tim Graham
8082c75d18
Removed db.backends methods which only call super().
2014-12-30 11:53:59 -05:00
Andriy Sokolovskiy
8c99b7920e
Fixed #12118 -- Added shared cache support to SQLite in-memory testing.
2014-12-30 10:14:33 -05:00
Tim Graham
ab4f709da4
Fixed #23581 -- Prevented extraneous DROP DEFAULT statements.
...
Thanks john_scott for the report and Markus Holtermann for review.
2014-12-30 07:54:05 -05:00
Ramiro Morales
002a8ffe47
Fixed breakage by 6fb9dee4
under Python2+Windows.
...
Refs #23271
2014-12-29 21:04:27 -03:00
Markus Holtermann
623ccdd598
Fixed #23938 -- Added migration support for m2m to concrete fields and vice versa
...
Thanks to Michael D. Hoyle for the report and Tim Graham for the review.
2014-12-29 13:41:12 -05:00
Claude Paroz
3c5d1edb39
Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapper
...
Thanks Daniel Hahler for the report and Tim Graham for the review.
2014-12-29 19:06:28 +01: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
Josh Smeaton
1cdfbde4db
Fixed #23753 -- Oracle failure with Coalesce
2014-12-29 19:44:13 +11:00
Aymeric Augustin
932d449f00
Explained the structure of django.template.
2014-12-28 17:02:31 +01:00
Aymeric Augustin
b7282db833
Raised a warning when using the legacy TEMPLATE_* settings.
...
All tests now rely on TEMPLATES.
2014-12-28 17:02:31 +01:00
Aymeric Augustin
9eb4f28e89
Deprecated TEMPLATE_CONTEXT_PROCESSORS.
2014-12-28 17:02:31 +01:00
Aymeric Augustin
d3205e3e2e
Deprecated TEMPLATE_DIRS.
2014-12-28 17:02:30 +01:00
Aymeric Augustin
cf0fd65ed4
Deprecated TEMPLATE_LOADERS.
2014-12-28 17:02:30 +01:00
Aymeric Augustin
84d7c93feb
Raised an error when allowed_include_roots is a string.
...
This avoids leaving projects silently vulnerable when this option is set
to a string instead of a one-item tuple containing that string, a very
common misconfiguration.
2014-12-28 17:02:29 +01:00
Aymeric Augustin
cf1f36bb6e
Deprecated current_app in TemplateResponse and render(_to_response).
2014-12-28 17:02:29 +01:00
Aymeric Augustin
e53495ba33
Preserved context class in inclusion_tag.
...
Previously, when a template was rendered with RequestContext, inclusion
tags were rendered with a plain context, losing additional information
available in the RequestContext.
The (admittedly bizarre) implementation of RequestContext.new() has the
side-effect of not running template context processors, making this
change backwards-compatible.
2014-12-28 17:02:29 +01:00