diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt index 5753abd56b..475ad5ceb3 100644 --- a/docs/howto/custom-model-fields.txt +++ b/docs/howto/custom-model-fields.txt @@ -177,6 +177,7 @@ below), but we ensure it has a fixed length, since it only needs to hold 52 card values plus their suits; 104 characters in total. .. note:: + Many of Django's model fields accept options that they don't do anything with. For example, you can pass both :attr:`~django.db.models.Field.editable` and @@ -189,8 +190,8 @@ card values plus their suits; 104 characters in total. This behavior simplifies the field classes, because they don't need to check for options that aren't necessary. They just pass all the options to the parent class and then don't use them later on. It's up to you whether - you want your fields to be more strict about the options they select, or - to use the simpler, more permissive behavior of the current fields. + you want your fields to be more strict about the options they select, or to + use the simpler, more permissive behavior of the current fields. .. method:: Field.__init__ diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index bdbe61505d..2da6774d44 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1895,12 +1895,13 @@ a new view to your admin site, extend the base a pattern for your new view. .. note:: + Any view you render that uses the admin templates, or extends the base admin template, should provide the ``current_app`` argument to - :class:`~django.template.RequestContext` or :class:`~django.template.Context` - when rendering the template. It should be set to either ``self.name`` if - your view is on an ``AdminSite`` or ``self.admin_site.name`` if your view - is on a ``ModelAdmin``. + :class:`~django.template.RequestContext` or + :class:`~django.template.Context` when rendering the template. It should + be set to either ``self.name`` if your view is on an ``AdminSite`` or + ``self.admin_site.name`` if your view is on a ``ModelAdmin``. .. _admin-reverse-urls: diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 781c231354..69e939bec1 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1765,11 +1765,13 @@ If the :doc:`staticfiles` contrib app is enabled files into this directory. See the howto on :doc:`managing static files` for more details about usage. -.. warning:: This should be an (initially empty) destination directory for - collecting your static files from their permanent locations into one - directory for ease of deployment; it is **not** a place to store your - static files permanently. You should do that in directories that will be - found by :doc:`staticfiles`'s +.. warning:: + + This should be an (initially empty) destination directory for collecting + your static files from their permanent locations into one directory for + ease of deployment; it is **not** a place to store your static files + permanently. You should do that in directories that will be found by + :doc:`staticfiles`'s :setting:`finders`, which by default, are ``'static/'`` app sub-directories and any directories you include in :setting:`STATICFILES_DIRS`). @@ -2059,9 +2061,9 @@ format of the current locale. See also :setting:`USE_I18N` and :setting:`LANGUAGE_CODE` .. note:: - The default :file:`settings.py` file created by - :djadmin:`django-admin.py startproject ` includes - ``USE_L10N = True`` for convenience. + + The default :file:`settings.py` file created by :djadmin:`django-admin.py + startproject ` includes ``USE_L10N = True`` for convenience. .. setting:: USE_THOUSAND_SEPARATOR diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index c8100fc0f9..2cea3eb7da 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -404,11 +404,12 @@ optional, third positional argument, ``processors``. In this example, the return HttpResponse(t.render(c)) .. note:: + If you're using Django's :func:`~django.shortcuts.render_to_response()` shortcut to populate a template with the contents of a dictionary, your template will be passed a ``Context`` instance by default (not a - ``RequestContext``). To use a ``RequestContext`` in your template rendering, - pass an optional third argument to + ``RequestContext``). To use a ``RequestContext`` in your template + rendering, pass an optional third argument to :func:`~django.shortcuts.render_to_response()`: a ``RequestContext`` instance. Your code might look like this:: @@ -704,12 +705,13 @@ class. Here are the template loaders that come with Django: ) .. note:: - All of the built-in Django template tags are safe to use with the cached - loader, but if you're using custom template tags that come from third - party packages, or that you wrote yourself, you should ensure that the - ``Node`` implementation for each tag is thread-safe. For more - information, see - :ref:`template tag thread safety considerations`. + + All of the built-in Django template tags are safe to use with the + cached loader, but if you're using custom template tags that come from + third party packages, or that you wrote yourself, you should ensure + that the ``Node`` implementation for each tag is thread-safe. For more + information, see :ref:`template tag thread safety + considerations`. This loader is disabled by default. diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index be2a774c95..6b9ba1e76f 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -98,13 +98,13 @@ view; it'll return that :class:`~django.http.HttpResponse`. Response middleware is always called on every response. .. note:: - Accessing :attr:`request.POST ` or - :attr:`request.REQUEST ` inside - middleware from ``process_request`` or ``process_view`` will prevent any - view running after the middleware from being able to - :ref:`modify the upload handlers for the - request `, and should normally be - avoided. + + Accessing :attr:`request.POST ` or + :attr:`request.REQUEST ` inside middleware + from ``process_request`` or ``process_view`` will prevent any view running + after the middleware from being able to :ref:`modify the upload handlers + for the request `, and should + normally be avoided. The :class:`~django.middleware.csrf.CsrfViewMiddleware` class can be considered an exception, as it provides the diff --git a/docs/topics/i18n/localization.txt b/docs/topics/i18n/localization.txt index a24db8d463..3c50e3993b 100644 --- a/docs/topics/i18n/localization.txt +++ b/docs/topics/i18n/localization.txt @@ -260,9 +260,10 @@ Django's formatting system is disabled by default. To enable it, it's necessary to set :setting:`USE_L10N = True ` in your settings file. .. note:: - The default :file:`settings.py` file created by - :djadmin:`django-admin.py startproject ` includes - :setting:`USE_L10N = True ` for convenience. + + The default :file:`settings.py` file created by :djadmin:`django-admin.py + startproject ` includes :setting:`USE_L10N = True ` + for convenience. When using Django's formatting system, dates and numbers on templates will be displayed using the format specified for the current locale. Two users