diff --git a/.tx/config b/.tx/config index 537a992d07..a5ccdead86 100644 --- a/.tx/config +++ b/.tx/config @@ -44,8 +44,8 @@ source_lang = en type = PO [wagtail.wagtailsnippets] -file_filter = wagtail/wagtailsnippets/locale//LC_MESSAGES/django.po -source_file = wagtail/wagtailsnippets/locale/en/LC_MESSAGES/django.po +file_filter = wagtail/snippets/locale//LC_MESSAGES/django.po +source_file = wagtail/snippets/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 9ccb47fe30..2eec5f5e7d 100644 --- a/docs/advanced_topics/settings.rst +++ b/docs/advanced_topics/settings.rst @@ -65,7 +65,7 @@ Apps (``settings.py``) 'wagtail.embeds', 'wagtail.sites', 'wagtail.wagtailusers', - 'wagtail.wagtailsnippets', + 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', @@ -507,7 +507,7 @@ These two files should reside in your project directory (``myproject/myproject/` 'wagtail.embeds', 'wagtail.sites', 'wagtail.wagtailusers', - 'wagtail.wagtailsnippets', + 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', diff --git a/docs/getting_started/integrating_into_django.rst b/docs/getting_started/integrating_into_django.rst index 941a52e231..a988b77c01 100644 --- a/docs/getting_started/integrating_into_django.rst +++ b/docs/getting_started/integrating_into_django.rst @@ -25,7 +25,7 @@ In your settings file, add the following apps to ``INSTALLED_APPS``: 'wagtail.embeds', 'wagtail.sites', 'wagtail.wagtailusers', - 'wagtail.wagtailsnippets', + 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', diff --git a/docs/getting_started/tutorial.rst b/docs/getting_started/tutorial.rst index cc4d098e0c..2624e91b6b 100644 --- a/docs/getting_started/tutorial.rst +++ b/docs/getting_started/tutorial.rst @@ -720,7 +720,7 @@ First, we define a ``BlogCategory`` model. A category is not a page in its own r .. code-block:: python - from wagtail.wagtailsnippets.models import register_snippet + from wagtail.snippets.models import register_snippet @register_snippet diff --git a/docs/reference/pages/panels.rst b/docs/reference/pages/panels.rst index 65966e395e..9836b49a5c 100644 --- a/docs/reference/pages/panels.rst +++ b/docs/reference/pages/panels.rst @@ -217,7 +217,7 @@ SnippetChooserPanel Before Wagtail 1.1, it was necessary to pass the snippet model class as a second parameter to ``SnippetChooserPanel``. This is now automatically picked up from the field. -.. module:: wagtail.wagtailsnippets.edit_handlers +.. module:: wagtail.snippets.edit_handlers .. class:: SnippetChooserPanel(field_name, snippet_type=None) @@ -225,7 +225,7 @@ SnippetChooserPanel .. code-block:: python - from wagtail.wagtailsnippets.edit_handlers import SnippetChooserPanel + from wagtail.snippets.edit_handlers import SnippetChooserPanel class BookPage(Page): advert = models.ForeignKey( diff --git a/docs/topics/pages.rst b/docs/topics/pages.rst index 0dbb54f02d..bff4a8259d 100644 --- a/docs/topics/pages.rst +++ b/docs/topics/pages.rst @@ -161,7 +161,7 @@ These are used for structuring fields in the interface. - :class:`~wagtail.admin.edit_handlers.PageChooserPanel` - :class:`~wagtail.images.edit_handlers.ImageChooserPanel` - :class:`~wagtail.documents.edit_handlers.DocumentChooserPanel` - - :class:`~wagtail.wagtailsnippets.edit_handlers.SnippetChooserPanel` + - :class:`~wagtail.snippets.edit_handlers.SnippetChooserPanel` .. note:: diff --git a/docs/topics/snippets.rst b/docs/topics/snippets.rst index 18101f8a25..d687fda367 100644 --- a/docs/topics/snippets.rst +++ b/docs/topics/snippets.rst @@ -18,7 +18,7 @@ Here's an example snippet model: from django.db import models from wagtail.admin.edit_handlers import FieldPanel - from wagtail.wagtailsnippets.models import register_snippet + from wagtail.snippets.models import register_snippet ... @@ -103,7 +103,7 @@ In the above example, the list of adverts is a fixed list, displayed independent .. code-block:: python - from wagtail.wagtailsnippets.edit_handlers import SnippetChooserPanel + from wagtail.snippets.edit_handlers import SnippetChooserPanel # ... class BookPage(Page): advert = models.ForeignKey( @@ -130,7 +130,7 @@ To attach multiple adverts to a page, the ``SnippetChooserPanel`` can be placed from django.db import models from wagtail.core.models import Page, Orderable - from wagtail.wagtailsnippets.edit_handlers import SnippetChooserPanel + from wagtail.snippets.edit_handlers import SnippetChooserPanel from modelcluster.fields import ParentalKey diff --git a/docs/topics/streamfield.rst b/docs/topics/streamfield.rst index 3f149266a1..8d9a5f9cc1 100644 --- a/docs/topics/streamfield.rst +++ b/docs/topics/streamfield.rst @@ -284,7 +284,7 @@ A control to allow the editor to select an existing image, or upload a new one. SnippetChooserBlock ~~~~~~~~~~~~~~~~~~~ -``wagtail.wagtailsnippets.blocks.SnippetChooserBlock`` +``wagtail.snippets.blocks.SnippetChooserBlock`` A control to allow the editor to select a snippet object. Requires one positional argument: the snippet class to choose from. The keyword argument ``required`` (default: True) is accepted. diff --git a/gulpfile.js/config.js b/gulpfile.js/config.js index ea8abf2855..a12897cc59 100644 --- a/gulpfile.js/config.js +++ b/gulpfile.js/config.js @@ -27,7 +27,7 @@ var apps = [ new App('wagtail/documents'), new App('wagtail/embeds'), new App('wagtail/images'), - new App('wagtail/wagtailsnippets'), + new App('wagtail/snippets'), new App('wagtail/wagtailusers'), new App('wagtail/contrib/wagtailstyleguide'), new App('wagtail/contrib/settings', { diff --git a/wagtail/contrib/modeladmin/options.py b/wagtail/contrib/modeladmin/options.py index c747feb3a7..9e873e3c09 100644 --- a/wagtail/contrib/modeladmin/options.py +++ b/wagtail/contrib/modeladmin/options.py @@ -453,7 +453,7 @@ class ModelAdmin(WagtailRegisterable): for a model to be assigned to groups in settings. This is only required if the model isn't a Page model, and isn't registered as a Snippet """ - from wagtail.wagtailsnippets.models import SNIPPET_MODELS + from wagtail.snippets.models import SNIPPET_MODELS if not self.is_pagemodel and self.model not in SNIPPET_MODELS: return self.permission_helper.get_all_model_permissions() return Permission.objects.none() diff --git a/wagtail/contrib/wagtailstyleguide/views.py b/wagtail/contrib/wagtailstyleguide/views.py index 45a3c1fff6..e6d725fcfd 100644 --- a/wagtail/contrib/wagtailstyleguide/views.py +++ b/wagtail/contrib/wagtailstyleguide/views.py @@ -13,7 +13,7 @@ from wagtail.admin.widgets import ( from wagtail.core.models import Page from wagtail.documents.widgets import AdminDocumentChooser from wagtail.images.widgets import AdminImageChooser -from wagtail.wagtailsnippets.widgets import AdminSnippetChooser +from wagtail.snippets.widgets import AdminSnippetChooser class ExampleForm(forms.Form): diff --git a/wagtail/project_template/project_name/settings/base.py b/wagtail/project_template/project_name/settings/base.py index 3e42521fd6..5e9079b032 100644 --- a/wagtail/project_template/project_name/settings/base.py +++ b/wagtail/project_template/project_name/settings/base.py @@ -34,7 +34,7 @@ INSTALLED_APPS = [ 'wagtail.embeds', 'wagtail.sites', 'wagtail.wagtailusers', - 'wagtail.wagtailsnippets', + 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', diff --git a/wagtail/wagtailsnippets/.gitignore b/wagtail/snippets/.gitignore similarity index 100% rename from wagtail/wagtailsnippets/.gitignore rename to wagtail/snippets/.gitignore diff --git a/wagtail/snippets/__init__.py b/wagtail/snippets/__init__.py new file mode 100644 index 0000000000..db3992213a --- /dev/null +++ b/wagtail/snippets/__init__.py @@ -0,0 +1 @@ +default_app_config = 'wagtail.snippets.apps.WagtailSnippetsAppConfig' diff --git a/wagtail/wagtailsnippets/apps.py b/wagtail/snippets/apps.py similarity index 84% rename from wagtail/wagtailsnippets/apps.py rename to wagtail/snippets/apps.py index 0af374bcb5..24be4e9753 100644 --- a/wagtail/wagtailsnippets/apps.py +++ b/wagtail/snippets/apps.py @@ -4,6 +4,6 @@ from django.apps import AppConfig class WagtailSnippetsAppConfig(AppConfig): - name = 'wagtail.wagtailsnippets' + name = 'wagtail.snippets' label = 'wagtailsnippets' verbose_name = "Wagtail snippets" diff --git a/wagtail/wagtailsnippets/blocks.py b/wagtail/snippets/blocks.py similarity index 89% rename from wagtail/wagtailsnippets/blocks.py rename to wagtail/snippets/blocks.py index 95c607fff8..5a778642ed 100644 --- a/wagtail/wagtailsnippets/blocks.py +++ b/wagtail/snippets/blocks.py @@ -17,7 +17,7 @@ class SnippetChooserBlock(ChooserBlock): @cached_property def widget(self): - from wagtail.wagtailsnippets.widgets import AdminSnippetChooser + from wagtail.snippets.widgets import AdminSnippetChooser return AdminSnippetChooser(self.target_model) class Meta: diff --git a/wagtail/wagtailsnippets/edit_handlers.py b/wagtail/snippets/edit_handlers.py similarity index 100% rename from wagtail/wagtailsnippets/edit_handlers.py rename to wagtail/snippets/edit_handlers.py diff --git a/wagtail/wagtailsnippets/locale/ar/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ar/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ar/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ar/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ar/LC_MESSAGES/django.po b/wagtail/snippets/locale/ar/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ar/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ar/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/bg/LC_MESSAGES/django.mo b/wagtail/snippets/locale/bg/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/bg/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/bg/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/bg/LC_MESSAGES/django.po b/wagtail/snippets/locale/bg/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/bg/LC_MESSAGES/django.po rename to wagtail/snippets/locale/bg/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/ca/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ca/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ca/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ca/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ca/LC_MESSAGES/django.po b/wagtail/snippets/locale/ca/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ca/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ca/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/cs/LC_MESSAGES/django.mo b/wagtail/snippets/locale/cs/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/cs/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/cs/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/cs/LC_MESSAGES/django.po b/wagtail/snippets/locale/cs/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/cs/LC_MESSAGES/django.po rename to wagtail/snippets/locale/cs/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/de/LC_MESSAGES/django.mo b/wagtail/snippets/locale/de/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/de/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/de/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/de/LC_MESSAGES/django.po b/wagtail/snippets/locale/de/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/de/LC_MESSAGES/django.po rename to wagtail/snippets/locale/de/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/el/LC_MESSAGES/django.mo b/wagtail/snippets/locale/el/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/el/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/el/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/el/LC_MESSAGES/django.po b/wagtail/snippets/locale/el/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/el/LC_MESSAGES/django.po rename to wagtail/snippets/locale/el/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/en/LC_MESSAGES/django.mo b/wagtail/snippets/locale/en/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/en/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/en/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/en/LC_MESSAGES/django.po b/wagtail/snippets/locale/en/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/en/LC_MESSAGES/django.po rename to wagtail/snippets/locale/en/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/es/LC_MESSAGES/django.mo b/wagtail/snippets/locale/es/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/es/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/es/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/es/LC_MESSAGES/django.po b/wagtail/snippets/locale/es/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/es/LC_MESSAGES/django.po rename to wagtail/snippets/locale/es/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/fa/LC_MESSAGES/django.mo b/wagtail/snippets/locale/fa/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/fa/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/fa/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/fa/LC_MESSAGES/django.po b/wagtail/snippets/locale/fa/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/fa/LC_MESSAGES/django.po rename to wagtail/snippets/locale/fa/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/fi/LC_MESSAGES/django.mo b/wagtail/snippets/locale/fi/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/fi/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/fi/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/fi/LC_MESSAGES/django.po b/wagtail/snippets/locale/fi/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/fi/LC_MESSAGES/django.po rename to wagtail/snippets/locale/fi/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/fr/LC_MESSAGES/django.mo b/wagtail/snippets/locale/fr/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/fr/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/fr/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/fr/LC_MESSAGES/django.po b/wagtail/snippets/locale/fr/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/fr/LC_MESSAGES/django.po rename to wagtail/snippets/locale/fr/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/gl/LC_MESSAGES/django.mo b/wagtail/snippets/locale/gl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/gl/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/gl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/gl/LC_MESSAGES/django.po b/wagtail/snippets/locale/gl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/gl/LC_MESSAGES/django.po rename to wagtail/snippets/locale/gl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/he_IL/LC_MESSAGES/django.mo b/wagtail/snippets/locale/he_IL/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/he_IL/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/he_IL/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/he_IL/LC_MESSAGES/django.po b/wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/he_IL/LC_MESSAGES/django.po rename to wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/hu/LC_MESSAGES/django.mo b/wagtail/snippets/locale/hu/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/hu/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/hu/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/hu/LC_MESSAGES/django.po b/wagtail/snippets/locale/hu/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/hu/LC_MESSAGES/django.po rename to wagtail/snippets/locale/hu/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/id_ID/LC_MESSAGES/django.mo b/wagtail/snippets/locale/id_ID/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/id_ID/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/id_ID/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/id_ID/LC_MESSAGES/django.po b/wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/id_ID/LC_MESSAGES/django.po rename to wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/is_IS/LC_MESSAGES/django.mo b/wagtail/snippets/locale/is_IS/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/is_IS/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/is_IS/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/is_IS/LC_MESSAGES/django.po b/wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/is_IS/LC_MESSAGES/django.po rename to wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/it/LC_MESSAGES/django.mo b/wagtail/snippets/locale/it/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/it/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/it/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/it/LC_MESSAGES/django.po b/wagtail/snippets/locale/it/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/it/LC_MESSAGES/django.po rename to wagtail/snippets/locale/it/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/ja/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ja/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ja/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ja/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ja/LC_MESSAGES/django.po b/wagtail/snippets/locale/ja/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ja/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ja/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/ka/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ka/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ka/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ka/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ka/LC_MESSAGES/django.po b/wagtail/snippets/locale/ka/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ka/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ka/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/ko/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ko/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ko/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ko/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ko/LC_MESSAGES/django.po b/wagtail/snippets/locale/ko/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ko/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ko/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/lt/LC_MESSAGES/django.mo b/wagtail/snippets/locale/lt/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/lt/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/lt/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/lt/LC_MESSAGES/django.po b/wagtail/snippets/locale/lt/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/lt/LC_MESSAGES/django.po rename to wagtail/snippets/locale/lt/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/lv/LC_MESSAGES/django.mo b/wagtail/snippets/locale/lv/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/lv/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/lv/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/lv/LC_MESSAGES/django.po b/wagtail/snippets/locale/lv/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/lv/LC_MESSAGES/django.po rename to wagtail/snippets/locale/lv/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/nb/LC_MESSAGES/django.mo b/wagtail/snippets/locale/nb/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/nb/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/nb/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/nb/LC_MESSAGES/django.po b/wagtail/snippets/locale/nb/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/nb/LC_MESSAGES/django.po rename to wagtail/snippets/locale/nb/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/nl/LC_MESSAGES/django.mo b/wagtail/snippets/locale/nl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/nl/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/nl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/nl/LC_MESSAGES/django.po b/wagtail/snippets/locale/nl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/nl/LC_MESSAGES/django.po rename to wagtail/snippets/locale/nl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/nl_NL/LC_MESSAGES/django.mo b/wagtail/snippets/locale/nl_NL/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/nl_NL/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/nl_NL/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/nl_NL/LC_MESSAGES/django.po b/wagtail/snippets/locale/nl_NL/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/nl_NL/LC_MESSAGES/django.po rename to wagtail/snippets/locale/nl_NL/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/pl/LC_MESSAGES/django.mo b/wagtail/snippets/locale/pl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/pl/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/pl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/pl/LC_MESSAGES/django.po b/wagtail/snippets/locale/pl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/pl/LC_MESSAGES/django.po rename to wagtail/snippets/locale/pl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/pt_BR/LC_MESSAGES/django.mo b/wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/pt_BR/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/pt_BR/LC_MESSAGES/django.po b/wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/pt_BR/LC_MESSAGES/django.po rename to wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/pt_PT/LC_MESSAGES/django.mo b/wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/pt_PT/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/pt_PT/LC_MESSAGES/django.po b/wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/pt_PT/LC_MESSAGES/django.po rename to wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/ro/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ro/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ro/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ro/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ro/LC_MESSAGES/django.po b/wagtail/snippets/locale/ro/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ro/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ro/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/ru/LC_MESSAGES/django.mo b/wagtail/snippets/locale/ru/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/ru/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/ru/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/ru/LC_MESSAGES/django.po b/wagtail/snippets/locale/ru/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/ru/LC_MESSAGES/django.po rename to wagtail/snippets/locale/ru/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/sk_SK/LC_MESSAGES/django.mo b/wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/sk_SK/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/sk_SK/LC_MESSAGES/django.po b/wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/sk_SK/LC_MESSAGES/django.po rename to wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/sl/LC_MESSAGES/django.mo b/wagtail/snippets/locale/sl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/sl/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/sl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/sl/LC_MESSAGES/django.po b/wagtail/snippets/locale/sl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/sl/LC_MESSAGES/django.po rename to wagtail/snippets/locale/sl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/sv/LC_MESSAGES/django.mo b/wagtail/snippets/locale/sv/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/sv/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/sv/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/sv/LC_MESSAGES/django.po b/wagtail/snippets/locale/sv/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/sv/LC_MESSAGES/django.po rename to wagtail/snippets/locale/sv/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/tr/LC_MESSAGES/django.mo b/wagtail/snippets/locale/tr/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/tr/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/tr/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/tr/LC_MESSAGES/django.po b/wagtail/snippets/locale/tr/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/tr/LC_MESSAGES/django.po rename to wagtail/snippets/locale/tr/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/zh/LC_MESSAGES/django.mo b/wagtail/snippets/locale/zh/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/zh/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/zh/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/zh/LC_MESSAGES/django.po b/wagtail/snippets/locale/zh/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/zh/LC_MESSAGES/django.po rename to wagtail/snippets/locale/zh/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/locale/zh_CN/LC_MESSAGES/django.mo b/wagtail/snippets/locale/zh_CN/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailsnippets/locale/zh_CN/LC_MESSAGES/django.mo rename to wagtail/snippets/locale/zh_CN/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailsnippets/locale/zh_CN/LC_MESSAGES/django.po b/wagtail/snippets/locale/zh_CN/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailsnippets/locale/zh_CN/LC_MESSAGES/django.po rename to wagtail/snippets/locale/zh_CN/LC_MESSAGES/django.po diff --git a/wagtail/wagtailsnippets/models.py b/wagtail/snippets/models.py similarity index 100% rename from wagtail/wagtailsnippets/models.py rename to wagtail/snippets/models.py diff --git a/wagtail/wagtailsnippets/permissions.py b/wagtail/snippets/permissions.py similarity index 93% rename from wagtail/wagtailsnippets/permissions.py rename to wagtail/snippets/permissions.py index 77364d844d..a1c0244bcb 100644 --- a/wagtail/wagtailsnippets/permissions.py +++ b/wagtail/snippets/permissions.py @@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals from django.contrib.auth import get_permission_codename -from wagtail.wagtailsnippets.models import get_snippet_models +from wagtail.snippets.models import get_snippet_models def get_permission_name(action, model): diff --git a/wagtail/wagtailsnippets/static_src/wagtailsnippets/js/snippet-chooser.js b/wagtail/snippets/static_src/wagtailsnippets/js/snippet-chooser.js similarity index 100% rename from wagtail/wagtailsnippets/static_src/wagtailsnippets/js/snippet-chooser.js rename to wagtail/snippets/static_src/wagtailsnippets/js/snippet-chooser.js diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/choose.html b/wagtail/snippets/templates/wagtailsnippets/chooser/choose.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/choose.html rename to wagtail/snippets/templates/wagtailsnippets/chooser/choose.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/choose.js b/wagtail/snippets/templates/wagtailsnippets/chooser/choose.js similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/choose.js rename to wagtail/snippets/templates/wagtailsnippets/chooser/choose.js diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/chosen.js b/wagtail/snippets/templates/wagtailsnippets/chooser/chosen.js similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/chosen.js rename to wagtail/snippets/templates/wagtailsnippets/chooser/chosen.js diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/results.html b/wagtail/snippets/templates/wagtailsnippets/chooser/results.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/chooser/results.html rename to wagtail/snippets/templates/wagtailsnippets/chooser/results.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/edit_handlers/snippet_chooser_panel.html b/wagtail/snippets/templates/wagtailsnippets/edit_handlers/snippet_chooser_panel.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/edit_handlers/snippet_chooser_panel.html rename to wagtail/snippets/templates/wagtailsnippets/edit_handlers/snippet_chooser_panel.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/confirm_delete.html b/wagtail/snippets/templates/wagtailsnippets/snippets/confirm_delete.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/confirm_delete.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/confirm_delete.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/create.html b/wagtail/snippets/templates/wagtailsnippets/snippets/create.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/create.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/create.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/edit.html b/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/edit.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/edit.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/index.html b/wagtail/snippets/templates/wagtailsnippets/snippets/index.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/index.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/index.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/list.html b/wagtail/snippets/templates/wagtailsnippets/snippets/list.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/list.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/list.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/results.html b/wagtail/snippets/templates/wagtailsnippets/snippets/results.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/results.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/results.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/type_index.html b/wagtail/snippets/templates/wagtailsnippets/snippets/type_index.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/type_index.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/type_index.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/usage.html b/wagtail/snippets/templates/wagtailsnippets/snippets/usage.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/snippets/usage.html rename to wagtail/snippets/templates/wagtailsnippets/snippets/usage.html diff --git a/wagtail/wagtailsnippets/templates/wagtailsnippets/widgets/snippet_chooser.html b/wagtail/snippets/templates/wagtailsnippets/widgets/snippet_chooser.html similarity index 100% rename from wagtail/wagtailsnippets/templates/wagtailsnippets/widgets/snippet_chooser.html rename to wagtail/snippets/templates/wagtailsnippets/widgets/snippet_chooser.html diff --git a/wagtail/wagtailsnippets/tests.py b/wagtail/snippets/tests.py similarity index 99% rename from wagtail/wagtailsnippets/tests.py rename to wagtail/snippets/tests.py index f74cf95206..e8f43a56b1 100644 --- a/wagtail/wagtailsnippets/tests.py +++ b/wagtail/snippets/tests.py @@ -18,10 +18,10 @@ from wagtail.tests.testapp.models import Advert, AdvertWithTabbedInterface, Snip from wagtail.tests.utils import WagtailTestUtils from wagtail.admin.forms import WagtailAdminModelForm from wagtail.core.models import Page -from wagtail.wagtailsnippets.blocks import SnippetChooserBlock -from wagtail.wagtailsnippets.edit_handlers import SnippetChooserPanel -from wagtail.wagtailsnippets.models import SNIPPET_MODELS, register_snippet -from wagtail.wagtailsnippets.views.snippets import get_snippet_edit_handler +from wagtail.snippets.blocks import SnippetChooserBlock +from wagtail.snippets.edit_handlers import SnippetChooserPanel +from wagtail.snippets.models import SNIPPET_MODELS, register_snippet +from wagtail.snippets.views.snippets import get_snippet_edit_handler class TestSnippetIndexView(TestCase, WagtailTestUtils): diff --git a/wagtail/wagtailsnippets/urls.py b/wagtail/snippets/urls.py similarity index 92% rename from wagtail/wagtailsnippets/urls.py rename to wagtail/snippets/urls.py index 7c1906a808..002ef6b26f 100644 --- a/wagtail/wagtailsnippets/urls.py +++ b/wagtail/snippets/urls.py @@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals from django.conf.urls import url -from wagtail.wagtailsnippets.views import chooser, snippets +from wagtail.snippets.views import chooser, snippets app_name = 'wagtailsnippets' urlpatterns = [ diff --git a/wagtail/wagtailsnippets/views/__init__.py b/wagtail/snippets/views/__init__.py similarity index 100% rename from wagtail/wagtailsnippets/views/__init__.py rename to wagtail/snippets/views/__init__.py diff --git a/wagtail/wagtailsnippets/views/chooser.py b/wagtail/snippets/views/chooser.py similarity index 97% rename from wagtail/wagtailsnippets/views/chooser.py rename to wagtail/snippets/views/chooser.py index f9dd7c5c27..827b81c3f3 100644 --- a/wagtail/wagtailsnippets/views/chooser.py +++ b/wagtail/snippets/views/chooser.py @@ -11,7 +11,7 @@ from wagtail.admin.forms import SearchForm from wagtail.admin.modal_workflow import render_modal_workflow from wagtail.search.backends import get_search_backend from wagtail.search.index import class_is_indexed -from wagtail.wagtailsnippets.views.snippets import get_snippet_model_from_url_params +from wagtail.snippets.views.snippets import get_snippet_model_from_url_params def choose(request, app_label, model_name): diff --git a/wagtail/wagtailsnippets/views/snippets.py b/wagtail/snippets/views/snippets.py similarity index 98% rename from wagtail/wagtailsnippets/views/snippets.py rename to wagtail/snippets/views/snippets.py index a4d6cfe155..a4f9650a9c 100644 --- a/wagtail/wagtailsnippets/views/snippets.py +++ b/wagtail/snippets/views/snippets.py @@ -15,8 +15,8 @@ from wagtail.admin.forms import SearchForm from wagtail.admin.utils import permission_denied from wagtail.search.backends import get_search_backend from wagtail.search.index import class_is_indexed -from wagtail.wagtailsnippets.models import get_snippet_models -from wagtail.wagtailsnippets.permissions import get_permission_name, user_can_edit_snippet_type +from wagtail.snippets.models import get_snippet_models +from wagtail.snippets.permissions import get_permission_name, user_can_edit_snippet_type # == Helper functions == diff --git a/wagtail/wagtailsnippets/wagtail_hooks.py b/wagtail/snippets/wagtail_hooks.py similarity index 89% rename from wagtail/wagtailsnippets/wagtail_hooks.py rename to wagtail/snippets/wagtail_hooks.py index 3725b01058..d06046e0e2 100644 --- a/wagtail/wagtailsnippets/wagtail_hooks.py +++ b/wagtail/snippets/wagtail_hooks.py @@ -10,9 +10,9 @@ from django.utils.translation import ugettext_lazy as _ from wagtail.admin.menu import MenuItem from wagtail.core import hooks -from wagtail.wagtailsnippets import urls -from wagtail.wagtailsnippets.models import get_snippet_models -from wagtail.wagtailsnippets.permissions import user_can_edit_snippets +from wagtail.snippets import urls +from wagtail.snippets.models import get_snippet_models +from wagtail.snippets.permissions import user_can_edit_snippets @hooks.register('register_admin_urls') diff --git a/wagtail/wagtailsnippets/widgets.py b/wagtail/snippets/widgets.py similarity index 100% rename from wagtail/wagtailsnippets/widgets.py rename to wagtail/snippets/widgets.py diff --git a/wagtail/tests/settings.py b/wagtail/tests/settings.py index 8a28824b22..c2821503c3 100644 --- a/wagtail/tests/settings.py +++ b/wagtail/tests/settings.py @@ -124,7 +124,7 @@ INSTALLED_APPS = ( 'wagtail.images', 'wagtail.sites', 'wagtail.wagtailusers', - 'wagtail.wagtailsnippets', + 'wagtail.snippets', 'wagtail.documents', 'wagtail.admin', 'wagtail.api.v2', diff --git a/wagtail/tests/snippets/models.py b/wagtail/tests/snippets/models.py index 002322936c..d879b4a78c 100644 --- a/wagtail/tests/snippets/models.py +++ b/wagtail/tests/snippets/models.py @@ -7,7 +7,7 @@ from modelcluster.models import ClusterableModel from wagtail.admin.edit_handlers import FieldPanel, InlinePanel from wagtail.core.fields import RichTextField from wagtail.search import index -from wagtail.wagtailsnippets.models import register_snippet +from wagtail.snippets.models import register_snippet from .forms import FancySnippetForm diff --git a/wagtail/tests/testapp/models.py b/wagtail/tests/testapp/models.py index bee303f663..e42249efce 100644 --- a/wagtail/tests/testapp/models.py +++ b/wagtail/tests/testapp/models.py @@ -34,8 +34,8 @@ from wagtail.images.blocks import ImageChooserBlock from wagtail.images.edit_handlers import ImageChooserPanel from wagtail.images.models import AbstractImage, AbstractRendition, Image from wagtail.search import index -from wagtail.wagtailsnippets.edit_handlers import SnippetChooserPanel -from wagtail.wagtailsnippets.models import register_snippet +from wagtail.snippets.edit_handlers import SnippetChooserPanel +from wagtail.snippets.models import register_snippet from .forms import ValidatedPageForm diff --git a/wagtail/wagtailsnippets/__init__.py b/wagtail/wagtailsnippets/__init__.py deleted file mode 100644 index 4b8d21cd75..0000000000 --- a/wagtail/wagtailsnippets/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = 'wagtail.wagtailsnippets.apps.WagtailSnippetsAppConfig'