move import of Site to avoid error when wagtail.contrib.sitemaps is in INSTALLED_APPS
move import of Site to avoid error when wagtail.contrib.sitemaps is in INSTALLED_APPS

The sitemap_generator module is imported from wagtail/contrib/sitemaps/__init__.py, which causes it to be imported immediately if wagtail.contrib.sitemaps is in INSTALLED_APPS (which is not required or part of the setup docs, but is something people are understandably likely to do). This is too early in startup to import models, and fails with an AppRegistryNotReady exception.

There's probably a good case for not having that import in __init__.py, but some code/docs in the wild relies on it (e.g. https://stackoverflow.com/questions/44681046/how-to-join-wagtail-and-django-sitemaps), so better to leave it in for now.

zerolab/wagtail,kaedroho/wagtail,torchbox/wagtail,mixxorz/wagtail,gasman/wagtail,kaedroho/wagtail,jnns/wagtail,thenewguy/wagtail,takeflight/wagtail,FlipperPA/wagtail,wagtail/wagtail,thenewguy/wagtail,FlipperPA/wagtail,torchbox/wagtail,torchbox/wagtail,FlipperPA/wagtail,thenewguy/wagtail,zerolab/wagtail,mixxorz/wagtail,mixxorz/wagtail,wagtail/wagtail,zerolab/wagtail,rsalmaso/wagtail,kaedroho/wagtail,jnns/wagtail,wagtail/wagtail,jnns/wagtail,takeflight/wagtail,takeflight/wagtail,torchbox/wagtail,thenewguy/wagtail,mixxorz/wagtail,thenewguy/wagtail,jnns/wagtail,FlipperPA/wagtail,rsalmaso/wagtail,wagtail/wagtail,rsalmaso/wagtail,gasman/wagtail,rsalmaso/wagtail,zerolab/wagtail,gasman/wagtail,rsalmaso/wagtail,kaedroho/wagtail,wagtail/wagtail,zerolab/wagtail,mixxorz/wagtail,takeflight/wagtail,gasman/wagtail,gasman/wagtail,kaedroho/wagtail