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.
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.
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.
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.
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
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.
This is derived from the current behaviour of FileSystemStorage.
Note that since this was not previously documented, other
implementations may not currently conform.
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
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.
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.