Przeglądaj źródła

Add note about CurrentSiteMiddleware incompatibility

As per https://github.com/wagtail/wagtail/issues/2840#issuecomment-522697801
Matt Westcott 5 lat temu
rodzic
commit
6a1a46b612
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      docs/getting_started/integrating_into_django.rst

+ 3 - 0
docs/getting_started/integrating_into_django.rst

@@ -42,6 +42,9 @@ Add the following entries to ``MIDDLEWARE``:
     'wagtail.core.middleware.SiteMiddleware',
     'wagtail.contrib.redirects.middleware.RedirectMiddleware',
 
+.. note::
+   Wagtail is currently incompatible with projects using ``django.contrib.sites.middleware.CurrentSiteMiddleware``, as both this and ``wagtail.core.middleware.SiteMiddleware`` set the attribute ``request.site``.
+
 Add a ``STATIC_ROOT`` setting, if your project does not have one already:
 
 .. code-block:: python