diff --git a/.tx/config b/.tx/config index c7b11a5f1a..2c87699244 100644 --- a/.tx/config +++ b/.tx/config @@ -32,8 +32,8 @@ source_lang = en type = PO [wagtail.wagtailredirects] -file_filter = wagtail/wagtailredirects/locale//LC_MESSAGES/django.po -source_file = wagtail/wagtailredirects/locale/en/LC_MESSAGES/django.po +file_filter = wagtail/contrib/redirects/locale//LC_MESSAGES/django.po +source_file = wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po source_lang = en type = PO diff --git a/docs/advanced_topics/settings.rst b/docs/advanced_topics/settings.rst index 04e2df43b0..4d69bd09c6 100644 --- a/docs/advanced_topics/settings.rst +++ b/docs/advanced_topics/settings.rst @@ -39,7 +39,7 @@ Middleware (``settings.py``) 'wagtail.core.middleware.SiteMiddleware', - 'wagtail.wagtailredirects.middleware.RedirectMiddleware', + 'wagtail.contrib.redirects.middleware.RedirectMiddleware', ] Wagtail requires several common Django middleware modules to work and cover basic security. Wagtail provides its own middleware to cover these tasks: @@ -61,7 +61,7 @@ Apps (``settings.py``) 'myapp', # your own app 'wagtail.contrib.forms', - 'wagtail.wagtailredirects', + 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', @@ -503,7 +503,7 @@ These two files should reside in your project directory (``myproject/myproject/` 'myapp', 'wagtail.contrib.forms', - 'wagtail.wagtailredirects', + 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', @@ -535,7 +535,7 @@ These two files should reside in your project directory (``myproject/myproject/` 'django.middleware.security.SecurityMiddleware', 'wagtail.core.middleware.SiteMiddleware', - 'wagtail.wagtailredirects.middleware.RedirectMiddleware', + 'wagtail.contrib.redirects.middleware.RedirectMiddleware', ] ROOT_URLCONF = 'myproject.urls' diff --git a/docs/getting_started/integrating_into_django.rst b/docs/getting_started/integrating_into_django.rst index 791671be4b..40131a2f29 100644 --- a/docs/getting_started/integrating_into_django.rst +++ b/docs/getting_started/integrating_into_django.rst @@ -21,7 +21,7 @@ In your settings file, add the following apps to ``INSTALLED_APPS``: .. code-block:: python 'wagtail.contrib.forms', - 'wagtail.wagtailredirects', + 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', @@ -40,7 +40,7 @@ Add the following entries to ``MIDDLEWARE``: .. code-block:: python 'wagtail.core.middleware.SiteMiddleware', - 'wagtail.wagtailredirects.middleware.RedirectMiddleware', + 'wagtail.contrib.redirects.middleware.RedirectMiddleware', Add a ``STATIC_ROOT`` setting, if your project does not have one already: diff --git a/wagtail/contrib/redirects/__init__.py b/wagtail/contrib/redirects/__init__.py new file mode 100644 index 0000000000..38c353b79b --- /dev/null +++ b/wagtail/contrib/redirects/__init__.py @@ -0,0 +1 @@ +default_app_config = 'wagtail.contrib.redirects.apps.WagtailRedirectsAppConfig' diff --git a/wagtail/wagtailredirects/apps.py b/wagtail/contrib/redirects/apps.py similarity index 84% rename from wagtail/wagtailredirects/apps.py rename to wagtail/contrib/redirects/apps.py index 1bb4b867d9..5322a0c63d 100644 --- a/wagtail/wagtailredirects/apps.py +++ b/wagtail/contrib/redirects/apps.py @@ -4,6 +4,6 @@ from django.apps import AppConfig class WagtailRedirectsAppConfig(AppConfig): - name = 'wagtail.wagtailredirects' + name = 'wagtail.contrib.redirects' label = 'wagtailredirects' verbose_name = "Wagtail redirects" diff --git a/wagtail/wagtailredirects/forms.py b/wagtail/contrib/redirects/forms.py similarity index 96% rename from wagtail/wagtailredirects/forms.py rename to wagtail/contrib/redirects/forms.py index 921dff2cee..5a51f43ff8 100644 --- a/wagtail/wagtailredirects/forms.py +++ b/wagtail/contrib/redirects/forms.py @@ -5,7 +5,7 @@ from django.utils.translation import ugettext_lazy as _ from wagtail.admin.widgets import AdminPageChooser from wagtail.core.models import Site -from wagtail.wagtailredirects.models import Redirect +from wagtail.contrib.redirects.models import Redirect class RedirectForm(forms.ModelForm): diff --git a/wagtail/wagtailredirects/locale/ar/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ar/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ar/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ar/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/bg/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/bg/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/bg/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/bg/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/ca/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ca/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ca/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ca/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/cs/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/cs/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/cs/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/cs/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/de/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/de/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/de/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/de/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/el/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/el/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/el/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/el/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/en/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/en/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/en/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/en/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/es/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/es/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/es/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/es/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/fa/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/fa/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/fa/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/fa/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/fi/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/fi/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/fi/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/fi/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/fr/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/fr/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/fr/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/fr/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/gl/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/gl/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/gl/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/gl/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/he_IL/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/he_IL/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/he_IL/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/he_IL/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/hu/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/hu/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/hu/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/hu/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/id_ID/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/id_ID/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/id_ID/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/id_ID/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/is_IS/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/is_IS/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/is_IS/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/is_IS/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/it/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/it/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/it/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/it/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/ja/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ja/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ja/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ja/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/ka/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ka/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ka/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ka/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/ko/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ko/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ko/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ko/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/lt/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/lt/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/lt/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/lt/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/lv/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/lv/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/lv/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/lv/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/nb/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/nb/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/nb/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/nb/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/nl/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/nl/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/nl/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/nl/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/nl_NL/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/nl_NL/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/nl_NL/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/nl_NL/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/nl_NL/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/nl_NL/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/nl_NL/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/nl_NL/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/pl/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/pl/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/pl/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/pl/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/pt_BR/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/pt_BR/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/pt_BR/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/pt_BR/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/pt_PT/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/pt_PT/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/pt_PT/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/pt_PT/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/ro/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ro/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ro/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ro/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/ru/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/ru/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/ru/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/ru/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/sk_SK/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/sk_SK/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/sk_SK/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/sk_SK/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/sl/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/sl/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/sl/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/sl/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/sv/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/sv/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/sv/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/sv/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/tr/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/tr/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/tr/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/tr/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/zh/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/zh/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/zh/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/zh/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/locale/zh_CN/LC_MESSAGES/django.mo b/wagtail/contrib/redirects/locale/zh_CN/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailredirects/locale/zh_CN/LC_MESSAGES/django.mo rename to wagtail/contrib/redirects/locale/zh_CN/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailredirects/locale/zh_CN/LC_MESSAGES/django.po b/wagtail/contrib/redirects/locale/zh_CN/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailredirects/locale/zh_CN/LC_MESSAGES/django.po rename to wagtail/contrib/redirects/locale/zh_CN/LC_MESSAGES/django.po diff --git a/wagtail/wagtailredirects/middleware.py b/wagtail/contrib/redirects/middleware.py similarity index 97% rename from wagtail/wagtailredirects/middleware.py rename to wagtail/contrib/redirects/middleware.py index 70954fcf15..aa8eccc2e6 100644 --- a/wagtail/wagtailredirects/middleware.py +++ b/wagtail/contrib/redirects/middleware.py @@ -6,7 +6,7 @@ from django import http from django.utils.deprecation import MiddlewareMixin from django.utils.encoding import uri_to_iri -from wagtail.wagtailredirects import models +from wagtail.contrib.redirects import models def _get_redirect(request, path): diff --git a/wagtail/wagtailredirects/migrations/0001_initial.py b/wagtail/contrib/redirects/migrations/0001_initial.py similarity index 100% rename from wagtail/wagtailredirects/migrations/0001_initial.py rename to wagtail/contrib/redirects/migrations/0001_initial.py diff --git a/wagtail/wagtailredirects/migrations/0002_add_verbose_names.py b/wagtail/contrib/redirects/migrations/0002_add_verbose_names.py similarity index 100% rename from wagtail/wagtailredirects/migrations/0002_add_verbose_names.py rename to wagtail/contrib/redirects/migrations/0002_add_verbose_names.py diff --git a/wagtail/wagtailredirects/migrations/0003_make_site_field_editable.py b/wagtail/contrib/redirects/migrations/0003_make_site_field_editable.py similarity index 100% rename from wagtail/wagtailredirects/migrations/0003_make_site_field_editable.py rename to wagtail/contrib/redirects/migrations/0003_make_site_field_editable.py diff --git a/wagtail/wagtailredirects/migrations/0004_set_unique_on_path_and_site.py b/wagtail/contrib/redirects/migrations/0004_set_unique_on_path_and_site.py similarity index 100% rename from wagtail/wagtailredirects/migrations/0004_set_unique_on_path_and_site.py rename to wagtail/contrib/redirects/migrations/0004_set_unique_on_path_and_site.py diff --git a/wagtail/wagtailredirects/migrations/0005_capitalizeverbose.py b/wagtail/contrib/redirects/migrations/0005_capitalizeverbose.py similarity index 100% rename from wagtail/wagtailredirects/migrations/0005_capitalizeverbose.py rename to wagtail/contrib/redirects/migrations/0005_capitalizeverbose.py diff --git a/wagtail/wagtailredirects/migrations/__init__.py b/wagtail/contrib/redirects/migrations/__init__.py similarity index 100% rename from wagtail/wagtailredirects/migrations/__init__.py rename to wagtail/contrib/redirects/migrations/__init__.py diff --git a/wagtail/wagtailredirects/models.py b/wagtail/contrib/redirects/models.py similarity index 100% rename from wagtail/wagtailredirects/models.py rename to wagtail/contrib/redirects/models.py diff --git a/wagtail/wagtailredirects/permissions.py b/wagtail/contrib/redirects/permissions.py similarity index 76% rename from wagtail/wagtailredirects/permissions.py rename to wagtail/contrib/redirects/permissions.py index eed23a1c39..8a44b556e4 100644 --- a/wagtail/wagtailredirects/permissions.py +++ b/wagtail/contrib/redirects/permissions.py @@ -1,6 +1,6 @@ from __future__ import absolute_import, unicode_literals from wagtail.core.permission_policies import ModelPermissionPolicy -from wagtail.wagtailredirects.models import Redirect +from wagtail.contrib.redirects.models import Redirect permission_policy = ModelPermissionPolicy(Redirect) diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/add.html b/wagtail/contrib/redirects/templates/wagtailredirects/add.html similarity index 100% rename from wagtail/wagtailredirects/templates/wagtailredirects/add.html rename to wagtail/contrib/redirects/templates/wagtailredirects/add.html diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/confirm_delete.html b/wagtail/contrib/redirects/templates/wagtailredirects/confirm_delete.html similarity index 100% rename from wagtail/wagtailredirects/templates/wagtailredirects/confirm_delete.html rename to wagtail/contrib/redirects/templates/wagtailredirects/confirm_delete.html diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/edit.html b/wagtail/contrib/redirects/templates/wagtailredirects/edit.html similarity index 100% rename from wagtail/wagtailredirects/templates/wagtailredirects/edit.html rename to wagtail/contrib/redirects/templates/wagtailredirects/edit.html diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/index.html b/wagtail/contrib/redirects/templates/wagtailredirects/index.html similarity index 100% rename from wagtail/wagtailredirects/templates/wagtailredirects/index.html rename to wagtail/contrib/redirects/templates/wagtailredirects/index.html diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/list.html b/wagtail/contrib/redirects/templates/wagtailredirects/list.html similarity index 100% rename from wagtail/wagtailredirects/templates/wagtailredirects/list.html rename to wagtail/contrib/redirects/templates/wagtailredirects/list.html diff --git a/wagtail/wagtailredirects/templates/wagtailredirects/results.html b/wagtail/contrib/redirects/templates/wagtailredirects/results.html similarity index 100% rename from wagtail/wagtailredirects/templates/wagtailredirects/results.html rename to wagtail/contrib/redirects/templates/wagtailredirects/results.html diff --git a/wagtail/wagtailredirects/tests.py b/wagtail/contrib/redirects/tests.py similarity index 99% rename from wagtail/wagtailredirects/tests.py rename to wagtail/contrib/redirects/tests.py index 4d28f7b81a..412020f9cd 100644 --- a/wagtail/wagtailredirects/tests.py +++ b/wagtail/contrib/redirects/tests.py @@ -6,7 +6,7 @@ from django.urls import reverse from wagtail.tests.utils import WagtailTestUtils from wagtail.core.models import Page, Site -from wagtail.wagtailredirects import models +from wagtail.contrib.redirects import models @override_settings(ALLOWED_HOSTS=['testserver', 'localhost', 'test.example.com', 'other.example.com']) diff --git a/wagtail/wagtailredirects/urls.py b/wagtail/contrib/redirects/urls.py similarity index 88% rename from wagtail/wagtailredirects/urls.py rename to wagtail/contrib/redirects/urls.py index 6ed5f83657..be45c43363 100644 --- a/wagtail/wagtailredirects/urls.py +++ b/wagtail/contrib/redirects/urls.py @@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals from django.conf.urls import url -from wagtail.wagtailredirects import views +from wagtail.contrib.redirects import views app_name = 'wagtailredirects' urlpatterns = [ diff --git a/wagtail/wagtailredirects/views.py b/wagtail/contrib/redirects/views.py similarity index 96% rename from wagtail/wagtailredirects/views.py rename to wagtail/contrib/redirects/views.py index 3193e13832..2a5b1b3f18 100644 --- a/wagtail/wagtailredirects/views.py +++ b/wagtail/contrib/redirects/views.py @@ -9,9 +9,9 @@ from wagtail.utils.pagination import paginate from wagtail.admin import messages from wagtail.admin.forms import SearchForm from wagtail.admin.utils import PermissionPolicyChecker, permission_denied -from wagtail.wagtailredirects import models -from wagtail.wagtailredirects.forms import RedirectForm -from wagtail.wagtailredirects.permissions import permission_policy +from wagtail.contrib.redirects import models +from wagtail.contrib.redirects.forms import RedirectForm +from wagtail.contrib.redirects.permissions import permission_policy permission_checker = PermissionPolicyChecker(permission_policy) diff --git a/wagtail/wagtailredirects/wagtail_hooks.py b/wagtail/contrib/redirects/wagtail_hooks.py similarity index 91% rename from wagtail/wagtailredirects/wagtail_hooks.py rename to wagtail/contrib/redirects/wagtail_hooks.py index aa99bc227a..385635b62a 100644 --- a/wagtail/wagtailredirects/wagtail_hooks.py +++ b/wagtail/contrib/redirects/wagtail_hooks.py @@ -7,8 +7,8 @@ from django.utils.translation import ugettext_lazy as _ from wagtail.admin.menu import MenuItem from wagtail.core import hooks -from wagtail.wagtailredirects import urls -from wagtail.wagtailredirects.permissions import permission_policy +from wagtail.contrib.redirects import urls +from wagtail.contrib.redirects.permissions import permission_policy @hooks.register('register_admin_urls') diff --git a/wagtail/project_template/project_name/settings/base.py b/wagtail/project_template/project_name/settings/base.py index a02f18b0e0..8217128430 100644 --- a/wagtail/project_template/project_name/settings/base.py +++ b/wagtail/project_template/project_name/settings/base.py @@ -30,7 +30,7 @@ INSTALLED_APPS = [ 'search', 'wagtail.contrib.forms', - 'wagtail.wagtailredirects', + 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', @@ -62,7 +62,7 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'wagtail.core.middleware.SiteMiddleware', - 'wagtail.wagtailredirects.middleware.RedirectMiddleware', + 'wagtail.contrib.redirects.middleware.RedirectMiddleware', ] ROOT_URLCONF = '{{ project_name }}.urls' diff --git a/wagtail/tests/settings.py b/wagtail/tests/settings.py index 65d380418c..a61c6630bb 100644 --- a/wagtail/tests/settings.py +++ b/wagtail/tests/settings.py @@ -95,14 +95,14 @@ MIDDLEWARE = ( 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'wagtail.core.middleware.SiteMiddleware', - 'wagtail.wagtailredirects.middleware.RedirectMiddleware', + 'wagtail.contrib.redirects.middleware.RedirectMiddleware', ) INSTALLED_APPS = ( # Install wagtailredirects with its appconfig # Theres nothing special about wagtailredirects, we just need to have one # app which uses AppConfigs to test that hooks load properly - 'wagtail.wagtailredirects.apps.WagtailRedirectsAppConfig', + 'wagtail.contrib.redirects.apps.WagtailRedirectsAppConfig', 'wagtail.tests.testapp', 'wagtail.tests.demosite', diff --git a/wagtail/wagtailredirects/__init__.py b/wagtail/wagtailredirects/__init__.py deleted file mode 100644 index b192b1b243..0000000000 --- a/wagtail/wagtailredirects/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = 'wagtail.wagtailredirects.apps.WagtailRedirectsAppConfig'