Commit Graph

2720 Commits

Author SHA1 Message Date
Josh Smeaton a0cebe82b5 [1.8.x] Refs #24485 -- Renamed some expression types
Backport of 88d798d71a from master
2015-03-17 08:40:45 -04:00
Preston Timmons ff71d6b8de [1.8.x] Documented Context.get() method.
Backport of 4d9414098b from master
2015-03-16 13:13:47 -04:00
Josh Smeaton 09062e9509 [1.8.x] Fixed #24486 -- Documented method to provide output_field to mixed F expressions
Backport of 820381d38b from master
2015-03-16 11:56:09 -04:00
Floris den Hengst bd36f2d432 [1.8.x] Fixed doc typos.
Backport of e42a720ba2 from master
2015-03-14 12:29:27 -04:00
Tim Graham 5b91802718 [1.8.x] Refs #24462 -- Emphasized that order_by() clears previous ordering.
Backport of b9d9ab23bd from master
2015-03-13 15:42:03 -04:00
Claude Paroz f115694547 [1.8.x] Documented gdal DataSource encoding parameter
Thanks Max Demars for the suggestion and Tim Graham for the review.
Backport of a8991b9b9f from master.
2015-03-13 16:41:37 +01:00
Steven Das e1657cc37f [1.8.x] Fixed typo in docs/ref/models/fields.txt
Backport of 53bc6e2e98 from master
2015-03-12 19:16:22 -04:00
Aksel Ethem fee18ce415 [1.8.x] Fixed #24364 -- Doc'ed that ManifestStaticFileStorage shouldn't be used during testing.
Backport of b4d8b16e51 from master
2015-03-12 09:23:57 -04:00
ldrumm def39428bf [1.8.x] Fixed wrong operator in iri_to_uri() docs
Backport of 27ad12a9b8 from master
2015-03-12 13:49:07 +01:00
Sean Wang e0e2df412f [1.8.x] Fixed #24414 -- Added examples of Prefetch object usage to the docs.
Backport of a3e89f13df from master
2015-03-11 12:39:50 -04:00
Preston Timmons 2982143dac [1.8.x] Fixed typo in current_app deprecation note.
Backport of 6b605be5fe from master
2015-03-11 12:36:08 -04:00
Claude Paroz 12e199356e [1.8.x] Fixed download instructions for cities shapefile
Thanks Daniel Wiesmann for spotting the issue.
Backport of 57d42aef97 from master.
2015-03-10 19:44:27 +01:00
Claude Paroz e2816f1ff9 [1.8.x] Updated GIS docs wrt GIS test paths
Backport of 1825365152 from master.
2015-03-10 18:01:29 +01:00
Calvin Jeong 6e81786f92 [1.8.x] Fixed typo in docs/ref/database.txt
Backport of cefbbb9db3 from master
2015-03-10 07:12:39 -04:00
Floris den Hengst 9853844ed3 [1.8.x] Fixed #24432 -- Added docs for ManyToManyFields that reside in and refer to the same model.
Backport of b9b8411129 from master
2015-03-09 20:46:26 -04:00
Aymeric Augustin 2bef57f3fb [1.8.x] Improved get_media_prefix template tag example.
Backport of 9a4a9a8a49 from master
2015-03-05 10:00:05 -05:00
Andrew Pinkham ac6bc2c090 [1.8.x] Fixed #24439 -- Removed incorrect make_object_list attributes in CBV docs.
Backport of fea45eff5a from master
2015-03-02 13:33:42 -05:00
Tim Graham 9d6f0dce13 [1.8.x] Fixed #24359 -- Cleaned up docs/ref/exceptions.html
Backport of 2b19b3a031 from master
2015-02-27 13:51:29 -05:00
Sean Wang f0780df608 [1.8.x] Fixed #24358 -- Corrected code-block directives for console sessions.
Backport of eba6dff581 from master
2015-02-22 09:36:51 -05:00
Marc Tamlyn 3886338c1d [1.8.x] Update converters to take a consistent set of parameters.
As suggested by Anssi. This has the slightly strange side effect of
passing the expression to Expression.convert_value has the expression
passed back to it, but it allows more complex patterns of expressions.

Backport of 32d4db66b9 from master
2015-02-20 11:47:48 +00:00
Aymeric Augustin cc4effba0b [1.8.x] Set context.template instead of context.engine while rendering.
This opens more possibilities, like accessing context.template.origin.

It also follows the chain of objects instead of following a shortcut.

Backport of 1bfcc95 from master
2015-02-19 22:10:56 +01:00
Tim Graham 730fb593ad [1.8.x] Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for contrib.postgres).
Backport of 3adc5f1ee6 from master
2015-02-17 06:21:59 -05:00
Tim Graham fb9551189d [1.8.x] Fixed #24350 -- Freshened up database install topic section.
Backport of 35f0cae19d from master
2015-02-16 14:59:57 -05:00
Tim Graham 50ec49c087 [1.8.x] Removed a note about old versions of MySQLdb.
Backport of f3bc7c5447 from master
2015-02-16 14:29:30 -05:00
Aymeric Augustin e8950668ca [1.8.x] Deprecated TEMPLATE_DEBUG setting.
Backport of 15b711b from master.
2015-02-15 20:48:48 +01:00
Claude Paroz a1fc97c1a7 [1.8.x] Fixed #24144 -- Documented that GEOSGeometry.envelope can return a point
Thanks Manel Clos for the report.
Backport of 1379165b35 from master.
2015-02-14 16:20:58 +01:00
Loic Bistuer 20b621eb3c [1.8.x] Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.
Thanks Carl Meyer and Tim Graham for the reviews and to all involved
in the discussion.

Backport of 18c0aaa912 from master
2015-02-14 02:42:06 +07:00
Joe Simpson 8277f5d7d0 [1.8.x] Added each_context() and a template tip to custom admin view docs.
Backport of 648e516b8d from master
2015-02-13 10:38:29 -05:00
Markus Holtermann bd80fa6b0f [1.8.x] 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.

Backport of f287bec583 from master
2015-02-13 15:21:10 +01:00
Josh Smeaton a6ea62aeaf [1.8.x] Refs #14030 -- Improved expression support for python values
Backport of e2d6e14662 from master
2015-02-12 08:53:03 +11:00
Tom Christie f5749252ea [1.8.x] Improved nested ArrayField example
Backport of 737b184d91 from master
2015-02-05 11:35:23 +01:00
Josh Schneier 16e3910e9c [1.8.x] Fixed typos of "select_related" in docs and tests.
Backport of 7d363ed432 from master
2015-02-04 07:32:34 -05:00
minusf b35c226154 [1.8.x] Fixed typos in docs/ref/forms/validation.txt.
Backport of 66f5aa9fa5 from master
2015-02-03 12:27:16 -05:00
Anssi Kääriäinen 43b0131fb5 [1.8.x] 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.

Backport of 8adc59038c from master
2015-02-03 09:25:55 -05:00
Tim Graham 5fdd74f4be [1.8.x] Fixed broken links in class based views flattend index; refs #24250.
Backport of 9a391fbd61 from master
2015-02-03 09:12:08 -05:00
Tim Graham 6454716264 [1.8.x] Fixed #24250 -- Corrected mistakes in FormMixin docs.
Backport of 5d193d042a from master
2015-02-03 08:42:49 -05:00
Aymeric Augustin f87457a460 [1.8.x] 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.

Backport of 2133f31 from master.

Conflicts:
	docs/topics/http/shortcuts.txt
	tests/generic_views/test_base.py
2015-02-03 08:32:14 +01:00
Collin Anderson 09e8985f25 [1.8.x] Fixed #24190 -- Clarified len(queryset)
Backport of ee23e03637 from master
2015-01-24 10:18:14 -05:00
Ng Zhi An 56015c01c4 [1.8.x] Fixed #24170 -- Implemented decompress for BaseRangeField widgets
Backport of 4669b6a807 from master
2015-01-23 15:07:03 -05:00
Simon Charette 90d9bf5ba4 [1.8.x] Fixed #24186 -- Fixed a typo in the admin docs.
Thanks to Keryn Knight for the report.

Backport of dccf41cff0 from master
2015-01-20 11:56:02 -05:00
Fabio C. Barrionuevo da Luz e69eea73d9 [1.8.x] Fixed #24177 -- Added documentation about database view support in inspectdb
Backport of bd691f4586 from master
2015-01-20 01:09:08 +01:00
Tim Graham 390559a75c [1.8.x] Clarified a contrib.sites deprecation and added to 1.7 release notes.
Backport of ba27f89587 from master
2015-01-18 13:44:53 -05:00
Tim Graham 737cd4ff3d [1.8.x] Clarified contrib.contenttypes.generic deprecation; refs #19774. 2015-01-18 13:43:02 -05:00
Tim Graham 8822d0bf7d [1.8.x] Removed usage of deprecated dumpdata options in docs.
Backport of 1d975ff44b from master
2015-01-17 20:15:09 -05:00
Tim Graham 7cfcdd98dc [1.8.x] Added versionadded to ModelAdmin.get_formsets_with_inlines(); refs #20702. 2015-01-17 18:12:47 -05:00
Tim Graham b714316c06 [1.8.x] Documented django.utils.timezone.FixedOffset; thanks Aymeric.
Backport of 25264d4e2a from master
2015-01-17 09:31:56 -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
Claude Paroz a79e6b6717 Fixed #24152 -- Deprecated GeoQuerySet aggregate methods
Thanks Josh Smeaton and Tim Graham for the reviews.
2015-01-16 19:53:02 +01:00
Keryn Knight 726a9550db Fixed #24143 -- Encouraged use of Http404 messages for debugging. 2015-01-16 09:41:01 -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
Luke Plant 4832c004e8 Direct readers to format_html() in mark_safe() docs. 2015-01-15 08:24:54 +00:00
Tim Graham 28308078f3 Fixed #22603 -- Reorganized classes in django.db.backends. 2015-01-14 14:16:20 -05:00
Collin Anderson e7771ec380 Fixed bad model example in admin docs. 2015-01-13 11:53:03 -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 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
Collin Anderson 26a92619f6 Fixed #24124 -- Changed context_processors in the default settings.py 2015-01-12 13:17:44 -05:00
Ng Zhi An 8f5d6c77b6 Fixed #23878 -- Moved Query and Prefetch documentation 2015-01-12 11:35:20 -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
Tim Graham 28de5cd4de Fixed spelling errors in docs. 2015-01-11 13:24:13 -05:00
Aymeric Augustin d89019a84d Improved template ugrading docs.
Recommending Template(template_code) was dumb. Described alternatives.
2015-01-10 21:11:58 +01:00
Aymeric Augustin f01306a6d8 Updated templates API reference.
Accounted for multiple template engines and made a few small fixes.
2015-01-10 20:17:22 +01:00
Aymeric Augustin 3d495cfd77 Added release notes and upgrade instructions for templates. 2015-01-10 20:17:20 +01:00
Aymeric Augustin ee8d5b91e9 Wrote main documentation for templates. 2015-01-10 20:16:19 +01:00
Aymeric Augustin 6c392bb2c0 Moved doc on the DTL's syntax to the ref/ section.
This makes room for a more general introduction about templating.

Updated some links to point to the new location, but kept those that
didn't talk specifically about the DTL.
2015-01-10 19:41:14 +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
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 2c0f64b5f6 Updated migration docs to match changes from a159b1fac 2015-01-07 20:10:30 +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
Preston Timmons de9ebdd39c Fixed #24022 -- Deprecated the ssi tag. 2015-01-05 19:35:02 -05:00
Collin Anderson 3d2cae0896 Fixed #24072 -- Added FileResponse for streaming binary files. 2015-01-05 10:51:52 -05:00
Alfred Perlstein db3f7c15cb Fixed #23749 -- Documented how to use the database alias in RunPython.
Thanks Markus Holtermann for review and feedback.
2015-01-03 12:06:40 -05:00
Daniel Pyrathon 8958170755 Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions 2015-01-02 10:46:04 -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 c4e796aa1b Fixed typo in docs/ref/contrib/admin/index.txt. 2015-01-01 08:18:39 -05:00
Thomas Tanner 46068d850d Fixed #22295 -- Replaced permission check for displaying admin user-tools 2014-12-31 16:31:59 -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
Florian Apolloner 1ee9507eb3 Fixed a vesionadded directive. 2014-12-29 10:22:19 +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 d3a982556d Deprecated TEMPLATE_STRING_IF_INVALID. 2014-12-28 17:02:30 +01:00
Aymeric Augustin 3dc01aaaaf Deprecated ALLOWED_INCLUDE_ROOTS. 2014-12-28 17:02:30 +01:00
Aymeric Augustin cf1f36bb6e Deprecated current_app in TemplateResponse and render(_to_response). 2014-12-28 17:02:29 +01:00
Aymeric Augustin fdbfc98003 Deprecated some arguments of django.shortcuts.render(_to_response).
dictionary and context_instance and superseded by context.

Refactored tests that relied context_instance with more modern idioms.
2014-12-28 17:02:29 +01:00
Aymeric Augustin 92e8f1f302 Moved context_processors from django.core to django.template. 2014-12-28 17:00:07 +01:00
Aymeric Augustin 90805b240f Supported multiple template engines in render_to_string.
Adjusted its API through a deprecation path according to the DEP.
2014-12-28 16:23:02 +01:00
Aymeric Augustin 1acfd624d6 Added initial support for loading template engines. 2014-12-28 16:08:31 +01:00
Josh Smeaton 4718296546 Fixed #23753 -- Added a suite of SQL Functions
Added functions and tests
Added docs and more tests
Added TextField converter to mysql backend
Aliased Value as V in example docs and tests
Removed unicode_compatible in example
Fixed console emulation in examples
2014-12-27 15:27:27 +11:00
Tim Graham c5fb34c47e Documented AdminSite.has_permission(); refs #22295. 2014-12-26 09:14:10 -05:00
Helen Sherwood-Taylor 4ccdf6e57f Fixed #24041 -- Documented effect of changing a model instance's primary key. 2014-12-24 15:06:09 -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