diff --git a/docs/install.rst b/docs/install.rst index 16ee61a..a899dc0 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -35,6 +35,34 @@ Add "django_find" to your ``INSTALLED_APPS`` setting like this:: 'django_find', ] +Make sure that the request object is available to templates! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you haven't already, you should also install Django's +`django.template.context_processors.request `_ +and +`django.template.context_processors.i18n `_. + +In other words, your settings need to set the TEMPLATES +variable to include the context_processors like so:: + + TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + # ... + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + # ... + 'django.template.context_processors.i18n', + 'django.template.context_processors.request', + ], + }, + }, + ] + Add it to your models ~~~~~~~~~~~~~~~~~~~~~