1
0
mirror of https://github.com/django/django.git synced 2024-11-20 00:14:08 +00:00
Commit Graph

7394 Commits

Author SHA1 Message Date
Aymeric Augustin
7331788300 Avoided rewrapping Contexts in render_to_response.
This change preserves backwards-compatibility for a very common misuse
of render_to_response which even occurred in the official documentation.

It fixes that misuse wherever it happened in the code base and docs.

Context.__init__ is documented as accepting a dict and nothing else.
Since Context is dict-like, Context(Context({})) could work to some
extent. However, things get complicated with RequestContext and that
gets in the way of refactoring the template engine. This is the real
rationale for this change.
2014-11-22 17:58:38 +01:00
Claude Paroz
b0a58b9085 Updated an old note about GEOSGeometry.transform 2014-11-22 12:20:17 +01:00
Stanislas Guerra
06726965c3 Fixed #23778 -- Added a doc section on using the Django runner for reusable apps. 2014-11-21 12:53:36 -07:00
Berker Peksag
343162410f Fixed #21753 -- Raised exception when both form_class and fields are specified. 2014-11-21 14:23:17 -05:00
Alasdair Nicol
5b26a014a8 Fixed #23865 -- documented how to assign errors to a field in Model.clean()
Also added a unit test wit the simpler syntax which we have documented,
where the dictionary values are strings.
2014-11-21 13:01:28 -05:00
Tom V
a3aeba0f95 Fixed typo in docs/internals/release-process.txt. 2014-11-21 11:47:31 -05:00
Andrzej Pragacz
72729f844e Fixed #23794 -- Fixed migrations crash when removing a field that's part of index/unique_together. 2014-11-21 10:55:19 -05:00
Sergey Fedoseev
f1783ee479 Corrected Permission.max_length in docs; refs #8162. 2014-11-21 08:20:48 -05:00
Anssi Kääriäinen
5c481db295 Fixed #23605 -- Fixed nested subquery regression
Added relabeled_clone() method to sql.Query to fix the problem. It
manifested itself in rare cases where at least double nested subquery's
filter condition might target non-existing alias.

Thanks to Trac alias ris for reporting the problem.
2014-11-20 13:38:08 -05:00
Alasdair Nicol
38ab0f13fa Added missing backticks to form validation docs 2014-11-20 11:09:21 -05:00
Claude Paroz
1a63093e22 Added AutoField introspection for PostgreSQL
Refs #23748.
2014-11-20 16:13:58 +01:00
Michal Petrucha
327df551e8 Fixed #23817 -- Updated docs on QuerySet evaluation
Removed inaccurate info about partial evaluation after refs #18702.
Added information on modifying sliced QuerySets; refs #22503.
2014-11-20 09:33:32 -05:00
Berker Peksag
788fa9fffa Fixed #12098 -- Simplified HttpRequest.__repr__(). 2014-11-20 08:45:11 -05:00
Carl Meyer
ab2819aa7b Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards. 2014-11-19 16:11:44 -07:00
Tim Graham
5bcd292098 Fixed #23871 -- Removed promotion of MySQL warnings to errors in DEBUG mode. 2014-11-19 16:07:49 -05:00
Stratos Moros
cf7a2a000e Fixed #22248 -- Made RenameModel reversible 2014-11-19 14:11:35 +02:00
Preston Timmons
536795f79a Fixed #23849 -- Documented the locmem.Loader class. 2014-11-18 21:17:17 -07:00
Carl Meyer
08fbbaa45b Deprecated calling a SQLCompiler instance. 2014-11-18 19:47:16 -07:00
Anton Baklanov
d63703f1cd Fixed #18714 -- Added 'fuzzy' compilemessages option 2014-11-18 22:44:16 +01:00
Tillmann Karras
d188101319 Fixed #23799 -- Made makemigrations respect --no-optimize.
Thanks to yamila-moreno for the idea of a skip message.
2014-11-18 07:37:06 +01:00
Carl Meyer
dee3946a91 Fix malformed note directives. 2014-11-17 16:42:54 -07:00
Éric Araujo
cbffc900bb Fix link target markup
This markup for a code block is redundant with the code-block directive below,
and blocks the following line from working as link target.
2014-11-17 16:37:18 -07:00
Markus Holtermann
7b4a994599 Fixed #23859 -- Fixed a migration crash when a field is renamed that is part of an index_together 2014-11-17 19:15:07 +01:00
Tim Graham
8fce797830 Fixed #23855 -- Removed unnecessary all() in tutorial 3. 2014-11-17 18:10:50 +01:00
Daniel Roseman
524e71c9c2 Fixed #20435 -- Reordered the custom template tags docs.
Introduced the various shortcuts before explaining the more complex
parser/render functionality.

Also removed non-decorator syntax: it's been years since Django
supported a Python version without decorators.
2014-11-17 17:38:04 +01:00
Aymeric Augustin
fab26cf5e0 Removed support for function-based template loaders.
They were deprecated in Django 1.2 but not all the supporting code was
removed in Django 1.4. Since the remaining code was unlikely to be
functional (pun intended) e.g. it would crash unless the loader
function had an is_usable attribute, this commit completes the removal
immediately instead of starting another deprecation path.
2014-11-16 22:18:33 +01:00
Aymeric Augustin
1851dcf377 Deprecated function-based loaders. 2014-11-16 21:41:42 +01:00
Aymeric Augustin
b503fee7ec Removed override_template_loaders and override_with_test_loader.
They can be replaced with override_settings and that makes the
corresponding tests much more obvious.
2014-11-16 21:40:50 +01:00
Aymeric Augustin
2577ae6a08 Moved all template loaders under django.template.loaders.
Reformatted the code of base.Loader according to modern standards.

Turned the test template loader into a regular locmem.Loader -- but
didn't document it.

Added a normal deprecation path for BaseLoader which is a public API.

Added an accelerated deprecation path for TestTemplateLoader which is
a private API.
2014-11-16 21:28:26 +01:00
Erik Romijn
de912495ab Added reminder to committing docs to test a PR with Jenkins first. 2014-11-16 13:32:40 +01:00
Josh Smeaton
f61256da3a Renamed qn to compiler 2014-11-16 13:19:34 +01:00
Julien Phalip
05e0e4674c Merge pull request #3549 from psagers/master
Fixes a race condition in the documentation.

The example for django.contrib.admin.ModelAdmin.get_form was modifying self.exclude. However, since ModelAdmin instances are global and have no thread- or request-locality, this is not safe for concurrent requests. This updated documentation demonstrates a safe method to override admin forms on a per-request basis.
2014-11-16 12:25:05 +01:00
Marc Tamlyn
d30a131119 Merge pull request #3524 from nmundar/ticket_23690
Fixed #23690 - fixed examples of manual rendering of form fields
2014-11-16 09:21:12 +00:00
Tim Graham
c38db4d7e0 Designated Django 1.8 as the next LTS. 2014-11-16 09:03:20 +01:00
Claude Paroz
5b9470efd8 Removed old version note in layermapping.txt 2014-11-15 20:42:08 +01:00
Peter Sagerson
0d1a9d203a Fixes a race condition in the documentation.
The example for django.contrib.admin.ModelAdmin.get_form modifies
self.exclude. However, since ModelAdmin instances are global and have no
thread- or request-locality, this is not safe for concurrent
requests.[1] This updated documentation demonstrates a safe method to
override admin forms on a per-request basis.

[1] https://groups.google.com/forum/#!topic/django-users/AmoUDtEefyA
2014-11-15 11:31:09 -08:00
Andreas Madsack
27c9b3a27d Fixed #23808 -- Documented that migrations table is created when using runserver without migrating first. 2014-11-15 20:03:22 +01:00
Berker Peksag
d2d6c0c097 Fixed #21363 -- Added datetime.timedelta support to TimestampSigner.unsign(). 2014-11-15 19:36:33 +01:00
Fabio Natali
fa680ce1e2 Fixed #23825 -- Added links for decorating class-based views to the CSRF docs. 2014-11-15 19:33:39 +01:00
Claude Paroz
35dac5070b Added a new GeoJSON serialization format for GeoDjango
Thanks Reinout van Rees for the review.
2014-11-15 18:07:18 +01:00
Yigit Guler
c5132382f0 Fixed #23793 -- Clarified password reset behavior in auth docs 2014-11-15 17:41:01 +01:00
Josh Smeaton
f59fd15c49 Fixed #14030 -- Allowed annotations to accept all expressions 2014-11-15 14:00:43 +00:00
nmundar
48515ee1f7 Fixed #23690 - fixed examples of manual rendering of form fields
Documentation for rendering form fields manually is now updated to use fields id_for_label instead of hardcoded values with additional mention of label_tag for alternative generation of complete label tag.
2014-11-15 13:29:16 +01:00
James Aylett
88e13b44ed Fixed #23827 -- TZ behavior in Storage API ref doc
This is derived from the current behaviour of FileSystemStorage.
Note that since this was not previously documented, other
implementations may not currently conform.
2014-11-15 11:57:53 +01:00
Berker Peksag
4f90c99635 Fixed #23665 -- Noted precedence of settings.USE_L10N in MONTH_DAY_FORMAT and YEAR_MONTH. 2014-11-15 09:53:55 +01:00
Berker Peksag
d552da1f8d Fixed #22407 -- Added AdminEmailHandler.send_mail(). 2014-11-15 09:38:19 +01:00
Michael Manfre
a305695f28 Merge pull request #3481 from manfre/ticket-16358
Fixed #16358 - Made memcache backend delete old value on a failure to set.
2014-11-13 22:10:22 -05:00
Tim Graham
3a550bb6d3 Fixed #23588 -- Added a link in tutorial for list_display options. 2014-11-13 20:15:45 +01:00
Tim Graham
c24a2e6cbd Fixed #23765 -- Removed BooleanField default check which often yielded false positives. 2014-11-13 20:12:29 +01:00
Tim Graham
d5a109f6e6 Fixed #23802 -- Typos in 1.7 release notes. 2014-11-13 20:10:02 +01:00
Tim Graham
098368d82f Added missing docs for 1_7.W001 check. 2014-11-13 17:56:29 +01:00
Claude Paroz
e541bbd0dc Removed doc reference to pre-1.5 PostGIS 2014-11-13 14:38:19 +01:00
Claude Paroz
7fd1f3a645 Updated Fink doc section to be version-agnostic 2014-11-13 14:34:47 +01:00
Adam DePue
e118e3af37 Fixed #23761 -- Added test for MySQL validator and db_type is None.
The issue was fixed on master in e9103402c0
so this just forwardports the test and release notes from stable/1.7.x.

Forwardport of 2d12a59938 from stable/1.7.x
2014-11-13 11:06:59 +01:00
Tim Graham
7ef81b5cdd Removed thread customizations of six which are now built-in. 2014-11-13 10:30:53 +01:00
Michael Manfre
bc8abe36ba Fixed #16358 - Made memcache backend delete old value on a failure to set.
Default Memcached configuration allows for a maximum object of 1MB and
will fail to set the key if it is too large. The key will be deleted from
memcached if it fails to be set. This is needed to avoid an issue with
cache_db session backend using the old value stored in memcached, instead
of the newer value stored in the database.
2014-11-13 00:46:03 -05:00
Baptiste Mispelon
bfb11b9562 Fixed #23795 -- Fixed a regression in custom form fields
Custom form fields having a `queryset` attribute but no
`limit_choices_to` could no longer be used in ModelForms.

Refs #2445.

Thanks to artscoop for the report.
2014-11-12 22:38:18 +01:00
Tim Graham
11b7680d0e Fixed #23774 -- Clarified QuerySet.order_by() and related models. 2014-11-12 22:00:48 +01:00
wrwrwr
f9213a85c3 Fixed #23775 -- Added docs for --bisect and --pair runtests options.
Thanks Baptiste Mispelon for review.
2014-11-12 20:46:34 +01:00
Tim Graham
40ba6f21bb Fixed spelling errors in docs. 2014-11-11 16:41:09 +01:00
averybigant
b7a5b6ab86 Fixed #23750 -- Allowed core.checks.register to be used as a function 2014-11-11 16:29:32 +01:00
aruseni
faf4d5c510 Fix a typo in 1.7 release notes 2014-11-10 20:01:07 -05:00
Luke Plant
b748a8bc67 Fixed #23789 -- TemplateResponse handles context differently from render 2014-11-10 14:47:45 +00:00
aruseni
006451f894 Fixed a typo in 1.6 release notes. 2014-11-10 15:36:42 +01:00
Tim Graham
091f5b5a4e Fixed #23785 -- Typo in docs/releases/1.6.txt 2014-11-09 22:10:31 +01:00
Markus Holtermann
c7c098cf97 Fixed #23770 -- Changed serialization strategy for floats with respect to NaN and Inf
Thanks to w0rp for the report
2014-11-06 15:30:30 +01:00
Tim Graham
9f4c718b2f Removed redundant link in 1.7 release notes. 2014-11-05 09:09:25 -05:00
Tim Graham
f5fe9f29c8 Added "Features removed in 1.8" section to release notes. 2014-11-05 09:08:09 -05:00
Loic Bistuer
f1f0c4f16b Removed confusing paragraph from the docs.
This snippet wasn't particularly helpful as `add_error()` is described
in greater details in the following section.

Thanks Claude Paroz for the report.
2014-11-05 16:00:30 +07:00
Tim Graham
81477c91f6 Updated six to 1.8.0. 2014-11-04 20:38:38 -05:00
Berker Peksag
df0523debc Fixed #23531 -- Added CommonMiddleware.response_redirect_class. 2014-11-04 17:56:57 -05:00
Marc Tamlyn
83daf53636 Fix minor typo in documentation. 2014-11-04 21:08:32 +00:00
Tim Graham
e645b79ef5 Added missing docs to DiscoverRunner for keepdb option; refs #20550. 2014-11-04 14:26:37 -05:00
Peter Inglesby
74e1980cf9 Fixed #13181 -- Added support for callable choices to forms.ChoiceField
Thanks vanschelven and expleo for the initial patch.
2014-11-04 11:23:58 -05:00
Tim Graham
e0685368c6 Fixed links to mysqlclient in database notes. 2014-11-04 07:35:42 -05:00
Tim Graham
f0ff452451 Added a warning about nonexistent FK constraints when unmigrated apps depend on migrated ones.
Thanks NotSqrt for the report; refs #23741.
2014-11-04 07:25:35 -05:00
Marc Tamlyn
36f514f065 Added HStoreField.
Thanks to `django-hstore` for inspiration in some areas, and many people
for reviews.
2014-11-04 09:26:40 +00:00
Berker Peksag
5c517ec218 Fixed versionchanged indentation in docs/. 2014-11-03 21:40:26 -05:00
Zan Anderle
7b42036752 Fixed #5405 -- Added admindocs support for reStructured text in model docstrings
Thanks elvard and gkmngrgn for work on the patch and Markus H. for review.
2014-11-03 15:30:46 -05:00
Tim Graham
ca88aa34ad Fixed spelling mistake in docs/ref/request-response.txt 2014-11-03 14:18:46 -05:00
Thomas Chaumeny
d89f56dc4d Fixed #21281 -- Made override_settings act at class level when used as a TestCase decorator. 2014-11-03 14:14:39 -05:00
Michael Kelly
ebc8e79cf3 Fixed #18523 -- Added stream-like API to HttpResponse.
Added getvalue() to HttpResponse to return the content of the response,
along with a few other methods to partially match io.IOBase.

Thanks Claude Paroz for the suggestion and Nick Sanford for review.
2014-11-03 12:29:19 -05:00
Andy Chosak
c0c78f1b70 Clarified custom lookups output_field documentation 2014-11-03 15:52:27 +02:00
Andy Chosak
ceb1ffcc8d Fixed #23420 - broken warning for unbound naive datetime objects
Fixed issue with warning message displayed for unbound naive datetime
objects when USE_TZ is True. Adds unit test that demonstrates the issue
(discoverable when using a custom lookup in MySQL).
2014-11-03 15:51:48 +02:00
Unai Zalakain
c548c8d0d1 Fixed #18456 -- Added path escaping to HttpRequest.get_full_path(). 2014-11-03 07:59:19 -05:00
Thomas Chaumeny
d3db878e4b Moved CSRF docs out of contrib. 2014-11-03 07:47:39 -05:00
James Brewer
332706eaa0 Fixed #23376 -- Made documentation about required Storage methods
consistent.

The following methods **should** be implemented, but are not required:

 * Storage.delete()
 * Storage.exists()
 * Storage.listdir()
 * Storage.size()
 * Storage.url()

Updated documentation to reflect this fact and give a couple of examples
where some methods may not be implemented. Add a warning that not
implementing some methods will result in a partial (possibly broken)
interface.

Ticket: https://code.djangoproject.com/ticket/23376
2014-11-03 03:32:41 -08:00
Tim Graham
6d0547c1ad Fixed #23744 -- Fixed typo in selenium testing example.
Thanks djbug for the report.
2014-11-01 12:36:28 -04:00
Tim Graham
d6d55368d4 Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on PostGIS.
Thanks raratiru for the report and Claude Paroz for review.
2014-10-31 18:37:52 -04:00
Konrad Świat
934a16dc93 Fixed #23468 -- Added checks for duplicate fixtures directories in loaddata.
If settings.FIXTURE_DIRS contains duplicates or a default fixture
directory (app_name/fixtures), ImproperlyConfigured is raised.

Thanks to Berker Peksag and Tim Graham for review.
2014-10-31 18:21:54 -04:00
Tim Graham
e958c760f9 Fixed #23732 -- Corrected and enhanced select_related() docs.
Thanks Daniele Procida for the report and review.
2014-10-31 15:40:07 -04:00
Tim Graham
3f651b3e88 Added a warning about direct settings manipulation in tests.
Thanks Thomas Chaumeny for the initial patch.
2014-10-31 13:34:41 -04:00
Markus Holtermann
715ccfde24 Fixed #23738 -- Allowed migrating from NULL to NOT NULL with the same default value
Thanks to Andrey Antukh for the report.
2014-10-31 13:30:30 -04:00
Markus Holtermann
ed2f96819c Fixed #23715 -- Prevented urlize from treating a trailing ! as part of an URL
Thanks to 57even for the report.
2014-10-31 08:06:40 -04:00
Simon Charette
f2ddc439b1 Fixed #23656 -- Made FormMixin.get_form's form_class argument optional.
Thanks Tim Graham for the review.
2014-10-30 19:10:52 -04:00
Tim Graham
19242c675f Fixed #23735 -- Clarified that admindocs must be enabled to view template tag libraries in admin.
Thanks Aymeric Augustin for the report.
2014-10-30 19:04:10 -04:00
Tim Graham
e7cb4f2fba Fixed #23736 -- Corrected the description of the value that silent_variable_failure uses.
Thanks Aymeric Augustin for the report.
2014-10-30 18:42:54 -04:00
Tim Graham
f85fcc75e3 Fixed #23737 -- Recommended the render() shortcut more strongly.
Thanks Aymeric Augustin for the report.
2014-10-30 18:34:10 -04:00
Tim Graham
08c5887f13 Fixed #23734 -- Replaced striptags in template filter overview since it has security implications.
Thanks Aymeric Augustin for the suggestion.
2014-10-30 18:26:13 -04:00
Zan Anderle
9e3aaa5a46 Explained why admindocs omits model methods with arguments. 2014-10-30 18:18:39 -04:00