Commit Graph

7689 Commits

Author SHA1 Message Date
Tim Graham ff39de1e1e [1.8.x] Added a "Writing migrations" how-to.
Backport of 570912a97d from master
2015-02-03 13:46:56 -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
Matt Westcott ef90ca5f42 [1.8.x] Fixed #24255 -- Specifed 'fields' parameter in modelformset_factory / inlineformset_factory examples.
Backport of 8d64aae883 from master
2015-02-02 10:47:42 -05:00
Tim Graham 6d0538bd8c [1.8.x] Simplified a versionchanged notes for LiveServerTestCase. 2015-02-01 21:06:27 -05:00
Tim Graham 28bb0ad199 [1.8.x] Fixed #24208 -- Documented changes in private model relations.
Backport of 888054bff7 from master
2015-01-31 11:03:08 -05:00
Claude Paroz c77dd64402 [1.8.x] Fixed #14483 -- Allowed using subqueries with GIS lookups
Backport of a0b5f15ea5 from master.
2015-01-30 20:29:05 +01:00
Andrei Kulakov 3d3c7a62c8 [1.8.x] Updated recommendation for testing keyword arg in custom fields.
Backport of dbabf43920 from master
2015-01-30 08:30:03 -05:00
Tim Graham df68751134 [1.8.x] Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure.
Backport of 29c0073335 from master
2015-01-30 06:34:36 -05:00
Tim Graham df7cca6dff [1.8.x] Added stub 1.7.5 release notes.
Backport of ac6033d883 from master
2015-01-28 06:39:11 -05:00
Markus Holtermann 29fa0e3c66 [1.8.x] Corrected naming of method and attribute
Backport of 335df82a3f from master
2015-01-27 19:48:46 +01:00
Tim Graham 617121cd4a [1.8.x] Added 1.4.19 release notes.
Backport of 6f8418089c from master
2015-01-27 11:48:27 -05:00
Markus Holtermann 645fe136c4 [1.8.x] Refs #24104 -- Added missing release notes
Forwardport of 3d4a826174 from stable/1.7.x
2015-01-27 16:05:27 +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
Claude Paroz bc93568500 [1.8.x] Fixed warning leak in static.serve() test
Partial forward port of b1bf8d64fb from 1.7.x. Refs #24193.
2015-01-23 09:05:46 +01: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
Markus Holtermann e55cb91bd4 [1.8.x] Fixed #24163 -- Removed unique constraint after index on MySQL
Thanks Łukasz Harasimowicz for the report.

Backport of 5792e6a88c from master
2015-01-19 16:55:25 +01:00
Tim Graham 0b3e3e21cf [1.8.x] Added deprecation docs for legacy lookup support; refs #16187.
Backport of 8e435a5640 from master
2015-01-19 10:45:50 -05:00
Tim Graham dd0707c3ca [1.8.x] Added missing items to deprecation timeline/1.7 release notes.
Backport of ecf109f215 from master
2015-01-18 21:24:09 -05:00
Tim Graham f31ed5c934 [1.8.x] Clarified deprecation of forms.forms.get_declared_fields(); refs #19617.
Backport of 89e9f81601 from master
2015-01-18 16:07:44 -05:00
Tim Graham 4af4ccfb30 [1.8.x] Clarified deprecation of test.utils.TestTemplateLoader.
Backport of 7468c948b6 from master
2015-01-18 14:20:15 -05: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 a41d41046a [1.8.x] Added removal of check management command to deprecation timeline.
Backport of 20e4e8fc79 from master
2015-01-17 19:15:59 -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 a58a120021 [1.8.x] Standardized indentation in docs/howto/custom-management-commands.txt. 2015-01-17 13:27:59 -05:00
Tim Graham bfa3478850 [1.8.x] Replaced deprecated requires_model_validation in docs.
Backport of 18192b9fa4 from master
2015-01-17 12:52:30 -05:00
Tim Graham 9f86d86c62 [1.8.x] Updated tutorial 1 with actual migrate output. 2015-01-17 10:46:27 -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
Tim Graham 8be1b8b488 [1.8.x] Bumped django_next_version in docs config. 2015-01-16 18:30:49 -05:00
Rick Hutcheson 801287bff2 [1.8.x] Fixed a typo in the test responses docs.
Backport of 996292d649 from master
2015-01-16 18:24:44 -05:00
Jannis Leidel a17724b791 Fixed the length of a headline in the 1.8 release notes.
This broke the website design in the sidebar because the line could not be wrapped.
2015-01-16 21:29:28 +01:00
Tim Graham 8e8daf7c9b Removed empty sections in 1.8 minor features. 2015-01-16 14:41:05 -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
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
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
Markus Holtermann 737d24923a Fixed #24075 -- Prevented running post_migrate signals when unapplying initial migrations of contenttypes and auth
Thanks Florian Apolloner for the report and Claude Paroz and Tim Graham for the review and help on the patch.
2015-01-14 19:59:39 +01:00
Tim Graham ec7ef5afbb Added stub release notes for 1.7.4. 2015-01-14 09:47:29 -05:00
Tim Graham 1913c1ac21 Added today's security issues to the archive. 2015-01-13 14:44:08 -05:00
Tim Graham 7ecd654497 Removed blank lines from docs/releases/security.txt 2015-01-13 14:37:30 -05:00
Tim Graham cbbe6a6abb Added dates to release notes. 2015-01-13 13:08:57 -05: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
Tim Graham 958aeda4b5 Added stub release notes for security releases. 2015-01-13 13:03:05 -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
Tim Graham 5d7217dce3 Fixed typo in docs/release/1.8.txt & added word for spelling check. 2015-01-12 17:53:32 -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
Ola Sitarska d563e3be68 Fixed #23913 -- Deprecated the `=` comparison in `if` template tag. 2015-01-11 15:21:01 -05:00
Tim Graham 28de5cd4de Fixed spelling errors in docs. 2015-01-11 13:24:13 -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
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 4797af2bb8 Updated custom template tags how-to.
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
Serafeim Papastefanos 74f02557e0 Fixed #23967 -- Added formats for Greek 2015-01-10 11:10:26 -05: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
Josh Smeaton f5c3a8bff5 Added Josh Smeaton bio to team 2015-01-10 13:48:37 +11:00
Markus Holtermann e174cce9dc Added my bio to the core team. 2015-01-10 00:53:09 +01:00
Tim Graham 7102b99653 Added best practices for versionadded/changed annotations. 2015-01-09 13:23:29 -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
Tim Graham 67d6a8c4e6 Fixed #24108 -- Updated Wilson's bio due to new Django Project Web site design. 2015-01-09 10:25:57 -05:00
Thomas Chaumeny 8fb7a0987c Fixed a typo in 1.8 release notes. 2015-01-09 07:38:11 -05:00
Sylvain Fankhauser c1493879d9 Fixed a typo in 1.8 release notes. 2015-01-08 16:02:18 -05:00
Tim Graham 13e4156518 Fixed a typo in 1.8 release notes. 2015-01-08 15:12:40 -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
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
Claude Paroz 2c0f64b5f6 Updated migration docs to match changes from a159b1fac 2015-01-07 20:10:30 +01:00
Josh Smeaton 5a4ac4ead9 Fixed #24078 -- Removed empty strings from GenericIPAddressField 2015-01-07 08:08:36 -05:00
Tim Graham 9b057b51ce Added 'loopback' to spelling word list. 2015-01-06 20:02:03 -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
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
Tim Graham 6288fccfda Updated release instructions with latest process. 2015-01-06 13:51:19 -05:00