diff --git a/.tx/config b/.tx/config index 9c1ba47745..40e12695a4 100644 --- a/.tx/config +++ b/.tx/config @@ -26,8 +26,8 @@ source_lang = en type = PO [wagtail.wagtailembeds] -file_filter = wagtail/wagtailembeds/locale//LC_MESSAGES/django.po -source_file = wagtail/wagtailembeds/locale/en/LC_MESSAGES/django.po +file_filter = wagtail/embeds/locale//LC_MESSAGES/django.po +source_file = wagtail/embeds/locale/en/LC_MESSAGES/django.po source_lang = en type = PO diff --git a/docs/advanced_topics/embeds.rst b/docs/advanced_topics/embeds.rst index b2ea4a3a2a..939890b54d 100644 --- a/docs/advanced_topics/embeds.rst +++ b/docs/advanced_topics/embeds.rst @@ -30,14 +30,14 @@ nest the embed code. ``EmbedBlock`` StreamField block type ------------------------------------- -The :class:`~wagtail.wagtailembeds.block.EmbedBlock` block type allows embeds +The :class:`~wagtail.embeds.block.EmbedBlock` block type allows embeds to be placed into a ``StreamField``. For example: .. code-block:: python - from wagtail.wagtailembeds.blocks import EmbedBlock + from wagtail.embeds.blocks import EmbedBlock class MyStreamField(blocks.StreamBlock): ... @@ -74,8 +74,8 @@ fetching the embed code. .. code-block:: python - from wagtail.wagtailembeds.embeds import get_embed - from wagtail.wagtailembeds.exceptions import EmbedException + from wagtail.embeds.embeds import get_embed + from wagtail.embeds.exceptions import EmbedException try: embed = get_embed('https://www.youtube.com/watch?v=SJXMTtvCxRo') @@ -103,7 +103,7 @@ The default configuration is: WAGTAILEMBEDS_FINDERS = [ { - 'class': 'wagtail.wagtailembeds.finders.oembed' + 'class': 'wagtail.embeds.finders.oembed' } ] @@ -132,7 +132,7 @@ and Youtube. It also adds a custom provider: .. code-block:: python - from wagtail.wagtailembeds.oembed_providers import youtube, vimeo + from wagtail.embeds.oembed_providers import youtube, vimeo # Add a custom provider # Your custom provider must support oEmbed for this to work. You should be @@ -148,7 +148,7 @@ and Youtube. It also adds a custom provider: WAGTAILEMBEDS_FINDERS = [ { - 'class': 'wagtail.wagtailembeds.finders.oembed', + 'class': 'wagtail.embeds.finders.oembed', 'providers': [youtube, vimeo, my_custom_provider], } ] @@ -164,21 +164,21 @@ For example, this is how you can instruct Youtube to return videos in HTTPS .. code-block:: python - from wagtail.wagtailembeds.oembed_providers import youtube + from wagtail.embeds.oembed_providers import youtube WAGTAILEMBEDS_FINDERS = [ # Fetches YouTube videos but puts ``?scheme=https`` in the GET parameters # when calling YouTube's oEmbed endpoint { - 'class': 'wagtail.wagtailembeds.finders.oembed', + 'class': 'wagtail.embeds.finders.oembed', 'providers': [youtube], 'options': {'scheme': 'https'} }, # Handles all other oEmbed providers the default way { - 'class': 'wagtail.wagtailembeds.finders.oembed', + 'class': 'wagtail.embeds.finders.oembed', } ] @@ -206,13 +206,13 @@ them. Wagtail has built in support for fetching embeds from Embed.ly. To use it, add an embed finder to your ``WAGTAILEMBEDS_FINDERS`` setting that uses the -``wagtail.wagtailembeds.finders.oembed`` class and pass it your API key: +``wagtail.embeds.finders.oembed`` class and pass it your API key: .. code-block:: python WAGTAILEMBEDS_FINDERS = [ { - 'class': 'wagtail.wagtailembeds.finders.embedly', + 'class': 'wagtail.embeds.finders.embedly', 'key': 'YOUR EMBED.LY KEY HERE' } ] @@ -229,7 +229,7 @@ docstrings for details of what each method does: .. code-block:: python - from wagtail.wagtailembeds.finders.base import EmbedFinder + from wagtail.embeds.finders.base import EmbedFinder class ExampleFinder(EmbedFinder): @@ -279,7 +279,7 @@ Once you've implemented all of those methods, you just need to add it to your The ``Embed`` model =================== -.. class:: wagtail.wagtailembeds.models.Embed +.. class:: wagtail.embeds.models.Embed Embeds are fetched only once and stored in the database so subsequent requests for an individual embed do not hit the embed finders again. diff --git a/docs/advanced_topics/settings.rst b/docs/advanced_topics/settings.rst index 62b139ff9a..777501a893 100644 --- a/docs/advanced_topics/settings.rst +++ b/docs/advanced_topics/settings.rst @@ -62,7 +62,7 @@ Apps (``settings.py``) 'wagtail.wagtailforms', 'wagtail.wagtailredirects', - 'wagtail.wagtailembeds', + 'wagtail.embeds', 'wagtail.wagtailsites', 'wagtail.wagtailusers', 'wagtail.wagtailsnippets', @@ -504,7 +504,7 @@ These two files should reside in your project directory (``myproject/myproject/` 'wagtail.wagtailforms', 'wagtail.wagtailredirects', - 'wagtail.wagtailembeds', + 'wagtail.embeds', 'wagtail.wagtailsites', 'wagtail.wagtailusers', 'wagtail.wagtailsnippets', diff --git a/docs/getting_started/integrating_into_django.rst b/docs/getting_started/integrating_into_django.rst index 802342363b..c054e98185 100644 --- a/docs/getting_started/integrating_into_django.rst +++ b/docs/getting_started/integrating_into_django.rst @@ -22,7 +22,7 @@ In your settings file, add the following apps to ``INSTALLED_APPS``: 'wagtail.wagtailforms', 'wagtail.wagtailredirects', - 'wagtail.wagtailembeds', + 'wagtail.embeds', 'wagtail.wagtailsites', 'wagtail.wagtailusers', 'wagtail.wagtailsnippets', diff --git a/docs/topics/streamfield.rst b/docs/topics/streamfield.rst index 9cbee685c2..443110d5b2 100644 --- a/docs/topics/streamfield.rst +++ b/docs/topics/streamfield.rst @@ -291,7 +291,7 @@ A control to allow the editor to select a snippet object. Requires one positiona EmbedBlock ~~~~~~~~~~ -``wagtail.wagtailembeds.blocks.EmbedBlock`` +``wagtail.embeds.blocks.EmbedBlock`` A field for the editor to enter a URL to a media item (such as a YouTube video) to appear as embedded media on the page. The keyword arguments ``required`` (default: True), ``max_length``, ``min_length`` and ``help_text`` are accepted. diff --git a/gulpfile.js/config.js b/gulpfile.js/config.js index 02b854697e..714321e2a3 100644 --- a/gulpfile.js/config.js +++ b/gulpfile.js/config.js @@ -25,7 +25,7 @@ App.prototype.scssSources = function() { var apps = [ new App('wagtail/admin'), new App('wagtail/documents'), - new App('wagtail/wagtailembeds'), + new App('wagtail/embeds'), new App('wagtail/wagtailimages'), new App('wagtail/wagtailsnippets'), new App('wagtail/wagtailusers'), diff --git a/wagtail/core/tests/test_rich_text.py b/wagtail/core/tests/test_rich_text.py index 240b1fa217..e8a420a76f 100644 --- a/wagtail/core/tests/test_rich_text.py +++ b/wagtail/core/tests/test_rich_text.py @@ -106,9 +106,9 @@ class TestExpandDbHtml(TestCase): result = expand_db_html(html) self.assertEqual(result, 'foo') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_expand_db_html_with_embed(self, get_embed): - from wagtail.wagtailembeds.models import Embed + from wagtail.embeds.models import Embed get_embed.return_value = Embed(html='test html') html = '' result = expand_db_html(html) diff --git a/wagtail/wagtailembeds/.gitignore b/wagtail/embeds/.gitignore similarity index 100% rename from wagtail/wagtailembeds/.gitignore rename to wagtail/embeds/.gitignore diff --git a/wagtail/embeds/__init__.py b/wagtail/embeds/__init__.py new file mode 100644 index 0000000000..300e556b4e --- /dev/null +++ b/wagtail/embeds/__init__.py @@ -0,0 +1 @@ +default_app_config = 'wagtail.embeds.apps.WagtailEmbedsAppConfig' diff --git a/wagtail/wagtailembeds/apps.py b/wagtail/embeds/apps.py similarity index 90% rename from wagtail/wagtailembeds/apps.py rename to wagtail/embeds/apps.py index 1c4044d2b1..03ef9d362d 100644 --- a/wagtail/wagtailembeds/apps.py +++ b/wagtail/embeds/apps.py @@ -6,7 +6,7 @@ from .finders import get_finders class WagtailEmbedsAppConfig(AppConfig): - name = 'wagtail.wagtailembeds' + name = 'wagtail.embeds' label = 'wagtailembeds' verbose_name = "Wagtail embeds" diff --git a/wagtail/wagtailembeds/blocks.py b/wagtail/embeds/blocks.py similarity index 96% rename from wagtail/wagtailembeds/blocks.py rename to wagtail/embeds/blocks.py index 47dfc90abd..80a5ee97d7 100644 --- a/wagtail/wagtailembeds/blocks.py +++ b/wagtail/embeds/blocks.py @@ -1,7 +1,7 @@ from __future__ import absolute_import, unicode_literals from wagtail.core import blocks -from wagtail.wagtailembeds.format import embed_to_frontend_html +from wagtail.embeds.format import embed_to_frontend_html class EmbedValue(object): diff --git a/wagtail/wagtailembeds/embeds.py b/wagtail/embeds/embeds.py similarity index 100% rename from wagtail/wagtailembeds/embeds.py rename to wagtail/embeds/embeds.py diff --git a/wagtail/wagtailembeds/exceptions.py b/wagtail/embeds/exceptions.py similarity index 100% rename from wagtail/wagtailembeds/exceptions.py rename to wagtail/embeds/exceptions.py diff --git a/wagtail/wagtailembeds/finders/__init__.py b/wagtail/embeds/finders/__init__.py similarity index 95% rename from wagtail/wagtailembeds/finders/__init__.py rename to wagtail/embeds/finders/__init__.py index 9e47723d14..0e835d67ee 100644 --- a/wagtail/wagtailembeds/finders/__init__.py +++ b/wagtail/embeds/finders/__init__.py @@ -31,7 +31,7 @@ def _get_config_from_settings(): # Default to the oembed backend return [ { - 'class': 'wagtail.wagtailembeds.finders.oembed', + 'class': 'wagtail.embeds.finders.oembed', } ] diff --git a/wagtail/wagtailembeds/finders/base.py b/wagtail/embeds/finders/base.py similarity index 100% rename from wagtail/wagtailembeds/finders/base.py rename to wagtail/embeds/finders/base.py diff --git a/wagtail/wagtailembeds/finders/embedly.py b/wagtail/embeds/finders/embedly.py similarity index 95% rename from wagtail/wagtailembeds/finders/embedly.py rename to wagtail/embeds/finders/embedly.py index 5070c89d08..a750cf22c1 100644 --- a/wagtail/wagtailembeds/finders/embedly.py +++ b/wagtail/embeds/finders/embedly.py @@ -1,6 +1,6 @@ from __future__ import absolute_import, unicode_literals -from wagtail.wagtailembeds.exceptions import EmbedException, EmbedNotFoundException +from wagtail.embeds.exceptions import EmbedException, EmbedNotFoundException from .base import EmbedFinder diff --git a/wagtail/wagtailembeds/finders/oembed.py b/wagtail/embeds/finders/oembed.py similarity index 95% rename from wagtail/wagtailembeds/finders/oembed.py rename to wagtail/embeds/finders/oembed.py index 6f66b3d2ac..90062224a6 100644 --- a/wagtail/wagtailembeds/finders/oembed.py +++ b/wagtail/embeds/finders/oembed.py @@ -8,8 +8,8 @@ from urllib.error import URLError from urllib.parse import urlencode from urllib.request import Request -from wagtail.wagtailembeds.exceptions import EmbedNotFoundException -from wagtail.wagtailembeds.oembed_providers import all_providers +from wagtail.embeds.exceptions import EmbedNotFoundException +from wagtail.embeds.oembed_providers import all_providers from .base import EmbedFinder diff --git a/wagtail/wagtailembeds/format.py b/wagtail/embeds/format.py similarity index 87% rename from wagtail/wagtailembeds/format.py rename to wagtail/embeds/format.py index db7c72f1a3..9ac6c56955 100644 --- a/wagtail/wagtailembeds/format.py +++ b/wagtail/embeds/format.py @@ -2,8 +2,8 @@ from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string -from wagtail.wagtailembeds import embeds -from wagtail.wagtailembeds.exceptions import EmbedException +from wagtail.embeds import embeds +from wagtail.embeds.exceptions import EmbedException def embed_to_frontend_html(url): diff --git a/wagtail/wagtailembeds/forms.py b/wagtail/embeds/forms.py similarity index 100% rename from wagtail/wagtailembeds/forms.py rename to wagtail/embeds/forms.py diff --git a/wagtail/wagtailembeds/locale/ar/LC_MESSAGES/django.mo b/wagtail/embeds/locale/ar/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/ar/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/ar/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/ar/LC_MESSAGES/django.po b/wagtail/embeds/locale/ar/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/ar/LC_MESSAGES/django.po rename to wagtail/embeds/locale/ar/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/bg/LC_MESSAGES/django.mo b/wagtail/embeds/locale/bg/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/bg/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/bg/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/bg/LC_MESSAGES/django.po b/wagtail/embeds/locale/bg/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/bg/LC_MESSAGES/django.po rename to wagtail/embeds/locale/bg/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/ca/LC_MESSAGES/django.mo b/wagtail/embeds/locale/ca/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/ca/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/ca/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/ca/LC_MESSAGES/django.po b/wagtail/embeds/locale/ca/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/ca/LC_MESSAGES/django.po rename to wagtail/embeds/locale/ca/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/cs/LC_MESSAGES/django.mo b/wagtail/embeds/locale/cs/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/cs/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/cs/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/cs/LC_MESSAGES/django.po b/wagtail/embeds/locale/cs/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/cs/LC_MESSAGES/django.po rename to wagtail/embeds/locale/cs/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/cy/LC_MESSAGES/django.mo b/wagtail/embeds/locale/cy/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/cy/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/cy/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/cy/LC_MESSAGES/django.po b/wagtail/embeds/locale/cy/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/cy/LC_MESSAGES/django.po rename to wagtail/embeds/locale/cy/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/de/LC_MESSAGES/django.mo b/wagtail/embeds/locale/de/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/de/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/de/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/de/LC_MESSAGES/django.po b/wagtail/embeds/locale/de/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/de/LC_MESSAGES/django.po rename to wagtail/embeds/locale/de/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/el/LC_MESSAGES/django.mo b/wagtail/embeds/locale/el/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/el/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/el/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/el/LC_MESSAGES/django.po b/wagtail/embeds/locale/el/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/el/LC_MESSAGES/django.po rename to wagtail/embeds/locale/el/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/en/LC_MESSAGES/django.mo b/wagtail/embeds/locale/en/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/en/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/en/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/en/LC_MESSAGES/django.po b/wagtail/embeds/locale/en/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/en/LC_MESSAGES/django.po rename to wagtail/embeds/locale/en/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/es/LC_MESSAGES/django.mo b/wagtail/embeds/locale/es/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/es/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/es/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/es/LC_MESSAGES/django.po b/wagtail/embeds/locale/es/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/es/LC_MESSAGES/django.po rename to wagtail/embeds/locale/es/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/fa/LC_MESSAGES/django.mo b/wagtail/embeds/locale/fa/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/fa/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/fa/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/fa/LC_MESSAGES/django.po b/wagtail/embeds/locale/fa/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/fa/LC_MESSAGES/django.po rename to wagtail/embeds/locale/fa/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/fi/LC_MESSAGES/django.mo b/wagtail/embeds/locale/fi/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/fi/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/fi/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/fi/LC_MESSAGES/django.po b/wagtail/embeds/locale/fi/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/fi/LC_MESSAGES/django.po rename to wagtail/embeds/locale/fi/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/fr/LC_MESSAGES/django.mo b/wagtail/embeds/locale/fr/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/fr/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/fr/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/fr/LC_MESSAGES/django.po b/wagtail/embeds/locale/fr/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/fr/LC_MESSAGES/django.po rename to wagtail/embeds/locale/fr/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/gl/LC_MESSAGES/django.mo b/wagtail/embeds/locale/gl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/gl/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/gl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/gl/LC_MESSAGES/django.po b/wagtail/embeds/locale/gl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/gl/LC_MESSAGES/django.po rename to wagtail/embeds/locale/gl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/he_IL/LC_MESSAGES/django.mo b/wagtail/embeds/locale/he_IL/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/he_IL/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/he_IL/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/he_IL/LC_MESSAGES/django.po b/wagtail/embeds/locale/he_IL/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/he_IL/LC_MESSAGES/django.po rename to wagtail/embeds/locale/he_IL/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/hu/LC_MESSAGES/django.mo b/wagtail/embeds/locale/hu/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/hu/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/hu/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/hu/LC_MESSAGES/django.po b/wagtail/embeds/locale/hu/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/hu/LC_MESSAGES/django.po rename to wagtail/embeds/locale/hu/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/is_IS/LC_MESSAGES/django.mo b/wagtail/embeds/locale/is_IS/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/is_IS/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/is_IS/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/is_IS/LC_MESSAGES/django.po b/wagtail/embeds/locale/is_IS/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/is_IS/LC_MESSAGES/django.po rename to wagtail/embeds/locale/is_IS/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/it/LC_MESSAGES/django.mo b/wagtail/embeds/locale/it/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/it/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/it/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/it/LC_MESSAGES/django.po b/wagtail/embeds/locale/it/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/it/LC_MESSAGES/django.po rename to wagtail/embeds/locale/it/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/ja/LC_MESSAGES/django.mo b/wagtail/embeds/locale/ja/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/ja/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/ja/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/ja/LC_MESSAGES/django.po b/wagtail/embeds/locale/ja/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/ja/LC_MESSAGES/django.po rename to wagtail/embeds/locale/ja/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/ko/LC_MESSAGES/django.mo b/wagtail/embeds/locale/ko/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/ko/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/ko/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/ko/LC_MESSAGES/django.po b/wagtail/embeds/locale/ko/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/ko/LC_MESSAGES/django.po rename to wagtail/embeds/locale/ko/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/lt/LC_MESSAGES/django.mo b/wagtail/embeds/locale/lt/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/lt/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/lt/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/lt/LC_MESSAGES/django.po b/wagtail/embeds/locale/lt/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/lt/LC_MESSAGES/django.po rename to wagtail/embeds/locale/lt/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/lv/LC_MESSAGES/django.mo b/wagtail/embeds/locale/lv/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/lv/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/lv/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/lv/LC_MESSAGES/django.po b/wagtail/embeds/locale/lv/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/lv/LC_MESSAGES/django.po rename to wagtail/embeds/locale/lv/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/mn/LC_MESSAGES/django.mo b/wagtail/embeds/locale/mn/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/mn/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/mn/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/mn/LC_MESSAGES/django.po b/wagtail/embeds/locale/mn/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/mn/LC_MESSAGES/django.po rename to wagtail/embeds/locale/mn/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/nb/LC_MESSAGES/django.mo b/wagtail/embeds/locale/nb/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/nb/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/nb/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/nb/LC_MESSAGES/django.po b/wagtail/embeds/locale/nb/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/nb/LC_MESSAGES/django.po rename to wagtail/embeds/locale/nb/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/nl/LC_MESSAGES/django.mo b/wagtail/embeds/locale/nl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/nl/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/nl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/nl/LC_MESSAGES/django.po b/wagtail/embeds/locale/nl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/nl/LC_MESSAGES/django.po rename to wagtail/embeds/locale/nl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/nl_NL/LC_MESSAGES/django.mo b/wagtail/embeds/locale/nl_NL/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/nl_NL/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/nl_NL/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/nl_NL/LC_MESSAGES/django.po b/wagtail/embeds/locale/nl_NL/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/nl_NL/LC_MESSAGES/django.po rename to wagtail/embeds/locale/nl_NL/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/pl/LC_MESSAGES/django.mo b/wagtail/embeds/locale/pl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/pl/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/pl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/pl/LC_MESSAGES/django.po b/wagtail/embeds/locale/pl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/pl/LC_MESSAGES/django.po rename to wagtail/embeds/locale/pl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/pt_BR/LC_MESSAGES/django.mo b/wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/pt_BR/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/pt_BR/LC_MESSAGES/django.po b/wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/pt_BR/LC_MESSAGES/django.po rename to wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/pt_PT/LC_MESSAGES/django.mo b/wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/pt_PT/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/pt_PT/LC_MESSAGES/django.po b/wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/pt_PT/LC_MESSAGES/django.po rename to wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/ro/LC_MESSAGES/django.mo b/wagtail/embeds/locale/ro/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/ro/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/ro/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/ro/LC_MESSAGES/django.po b/wagtail/embeds/locale/ro/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/ro/LC_MESSAGES/django.po rename to wagtail/embeds/locale/ro/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/ru/LC_MESSAGES/django.mo b/wagtail/embeds/locale/ru/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/ru/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/ru/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/ru/LC_MESSAGES/django.po b/wagtail/embeds/locale/ru/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/ru/LC_MESSAGES/django.po rename to wagtail/embeds/locale/ru/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/sk_SK/LC_MESSAGES/django.mo b/wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/sk_SK/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/sk_SK/LC_MESSAGES/django.po b/wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/sk_SK/LC_MESSAGES/django.po rename to wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/sl/LC_MESSAGES/django.mo b/wagtail/embeds/locale/sl/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/sl/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/sl/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/sl/LC_MESSAGES/django.po b/wagtail/embeds/locale/sl/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/sl/LC_MESSAGES/django.po rename to wagtail/embeds/locale/sl/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/sv/LC_MESSAGES/django.mo b/wagtail/embeds/locale/sv/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/sv/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/sv/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/sv/LC_MESSAGES/django.po b/wagtail/embeds/locale/sv/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/sv/LC_MESSAGES/django.po rename to wagtail/embeds/locale/sv/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/tr/LC_MESSAGES/django.mo b/wagtail/embeds/locale/tr/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/tr/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/tr/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/tr/LC_MESSAGES/django.po b/wagtail/embeds/locale/tr/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/tr/LC_MESSAGES/django.po rename to wagtail/embeds/locale/tr/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/zh/LC_MESSAGES/django.mo b/wagtail/embeds/locale/zh/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/zh/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/zh/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/zh/LC_MESSAGES/django.po b/wagtail/embeds/locale/zh/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/zh/LC_MESSAGES/django.po rename to wagtail/embeds/locale/zh/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/locale/zh_CN/LC_MESSAGES/django.mo b/wagtail/embeds/locale/zh_CN/LC_MESSAGES/django.mo similarity index 100% rename from wagtail/wagtailembeds/locale/zh_CN/LC_MESSAGES/django.mo rename to wagtail/embeds/locale/zh_CN/LC_MESSAGES/django.mo diff --git a/wagtail/wagtailembeds/locale/zh_CN/LC_MESSAGES/django.po b/wagtail/embeds/locale/zh_CN/LC_MESSAGES/django.po similarity index 100% rename from wagtail/wagtailembeds/locale/zh_CN/LC_MESSAGES/django.po rename to wagtail/embeds/locale/zh_CN/LC_MESSAGES/django.po diff --git a/wagtail/wagtailembeds/migrations/0001_initial.py b/wagtail/embeds/migrations/0001_initial.py similarity index 100% rename from wagtail/wagtailembeds/migrations/0001_initial.py rename to wagtail/embeds/migrations/0001_initial.py diff --git a/wagtail/wagtailembeds/migrations/0002_add_verbose_names.py b/wagtail/embeds/migrations/0002_add_verbose_names.py similarity index 100% rename from wagtail/wagtailembeds/migrations/0002_add_verbose_names.py rename to wagtail/embeds/migrations/0002_add_verbose_names.py diff --git a/wagtail/wagtailembeds/migrations/0003_capitalizeverbose.py b/wagtail/embeds/migrations/0003_capitalizeverbose.py similarity index 100% rename from wagtail/wagtailembeds/migrations/0003_capitalizeverbose.py rename to wagtail/embeds/migrations/0003_capitalizeverbose.py diff --git a/wagtail/wagtailembeds/migrations/__init__.py b/wagtail/embeds/migrations/__init__.py similarity index 100% rename from wagtail/wagtailembeds/migrations/__init__.py rename to wagtail/embeds/migrations/__init__.py diff --git a/wagtail/wagtailembeds/models.py b/wagtail/embeds/models.py similarity index 100% rename from wagtail/wagtailembeds/models.py rename to wagtail/embeds/models.py diff --git a/wagtail/wagtailembeds/oembed_providers.py b/wagtail/embeds/oembed_providers.py similarity index 100% rename from wagtail/wagtailembeds/oembed_providers.py rename to wagtail/embeds/oembed_providers.py diff --git a/wagtail/wagtailembeds/rich_text.py b/wagtail/embeds/rich_text.py similarity index 92% rename from wagtail/wagtailembeds/rich_text.py rename to wagtail/embeds/rich_text.py index 916b0d64bf..ed18b9ecfe 100644 --- a/wagtail/wagtailembeds/rich_text.py +++ b/wagtail/embeds/rich_text.py @@ -1,7 +1,7 @@ from __future__ import absolute_import, unicode_literals -from wagtail.wagtailembeds import format -from wagtail.wagtailembeds.exceptions import EmbedException +from wagtail.embeds import format +from wagtail.embeds.exceptions import EmbedException class MediaEmbedHandler(object): diff --git a/wagtail/wagtailembeds/static_src/wagtailembeds/js/hallo-plugins/hallo-wagtailembeds.js b/wagtail/embeds/static_src/wagtailembeds/js/hallo-plugins/hallo-wagtailembeds.js similarity index 100% rename from wagtail/wagtailembeds/static_src/wagtailembeds/js/hallo-plugins/hallo-wagtailembeds.js rename to wagtail/embeds/static_src/wagtailembeds/js/hallo-plugins/hallo-wagtailembeds.js diff --git a/wagtail/wagtailembeds/templates/wagtailembeds/chooser/chooser.html b/wagtail/embeds/templates/wagtailembeds/chooser/chooser.html similarity index 100% rename from wagtail/wagtailembeds/templates/wagtailembeds/chooser/chooser.html rename to wagtail/embeds/templates/wagtailembeds/chooser/chooser.html diff --git a/wagtail/wagtailembeds/templates/wagtailembeds/chooser/chooser.js b/wagtail/embeds/templates/wagtailembeds/chooser/chooser.js similarity index 100% rename from wagtail/wagtailembeds/templates/wagtailembeds/chooser/chooser.js rename to wagtail/embeds/templates/wagtailembeds/chooser/chooser.js diff --git a/wagtail/wagtailembeds/templates/wagtailembeds/chooser/embed_chosen.js b/wagtail/embeds/templates/wagtailembeds/chooser/embed_chosen.js similarity index 100% rename from wagtail/wagtailembeds/templates/wagtailembeds/chooser/embed_chosen.js rename to wagtail/embeds/templates/wagtailembeds/chooser/embed_chosen.js diff --git a/wagtail/wagtailembeds/templates/wagtailembeds/embed_editor.html b/wagtail/embeds/templates/wagtailembeds/embed_editor.html similarity index 100% rename from wagtail/wagtailembeds/templates/wagtailembeds/embed_editor.html rename to wagtail/embeds/templates/wagtailembeds/embed_editor.html diff --git a/wagtail/wagtailembeds/templates/wagtailembeds/embed_frontend.html b/wagtail/embeds/templates/wagtailembeds/embed_frontend.html similarity index 100% rename from wagtail/wagtailembeds/templates/wagtailembeds/embed_frontend.html rename to wagtail/embeds/templates/wagtailembeds/embed_frontend.html diff --git a/wagtail/wagtailembeds/templatetags/__init__.py b/wagtail/embeds/templatetags/__init__.py similarity index 100% rename from wagtail/wagtailembeds/templatetags/__init__.py rename to wagtail/embeds/templatetags/__init__.py diff --git a/wagtail/wagtailembeds/templatetags/wagtailembeds_tags.py b/wagtail/embeds/templatetags/wagtailembeds_tags.py similarity index 79% rename from wagtail/wagtailembeds/templatetags/wagtailembeds_tags.py rename to wagtail/embeds/templatetags/wagtailembeds_tags.py index 9bc99c0364..7454d1af2d 100644 --- a/wagtail/wagtailembeds/templatetags/wagtailembeds_tags.py +++ b/wagtail/embeds/templatetags/wagtailembeds_tags.py @@ -3,8 +3,8 @@ from __future__ import absolute_import, unicode_literals from django import template from django.utils.safestring import mark_safe -from wagtail.wagtailembeds import embeds -from wagtail.wagtailembeds.exceptions import EmbedException +from wagtail.embeds import embeds +from wagtail.embeds.exceptions import EmbedException register = template.Library() diff --git a/wagtail/wagtailembeds/tests.py b/wagtail/embeds/tests.py similarity index 94% rename from wagtail/wagtailembeds/tests.py rename to wagtail/embeds/tests.py index 45fa02710a..3abbc26de9 100644 --- a/wagtail/wagtailembeds/tests.py +++ b/wagtail/embeds/tests.py @@ -13,18 +13,18 @@ from mock import patch from wagtail.tests.utils import WagtailTestUtils from wagtail.core import blocks -from wagtail.wagtailembeds import oembed_providers -from wagtail.wagtailembeds.blocks import EmbedBlock, EmbedValue -from wagtail.wagtailembeds.embeds import get_embed -from wagtail.wagtailembeds.exceptions import ( +from wagtail.embeds import oembed_providers +from wagtail.embeds.blocks import EmbedBlock, EmbedValue +from wagtail.embeds.embeds import get_embed +from wagtail.embeds.exceptions import ( EmbedNotFoundException, EmbedUnsupportedProviderException) -from wagtail.wagtailembeds.finders import get_finders -from wagtail.wagtailembeds.finders.embedly import EmbedlyFinder as EmbedlyFinder -from wagtail.wagtailembeds.finders.embedly import AccessDeniedEmbedlyException, EmbedlyException -from wagtail.wagtailembeds.finders.oembed import OEmbedFinder as OEmbedFinder -from wagtail.wagtailembeds.models import Embed -from wagtail.wagtailembeds.rich_text import MediaEmbedHandler -from wagtail.wagtailembeds.templatetags.wagtailembeds_tags import embed_tag +from wagtail.embeds.finders import get_finders +from wagtail.embeds.finders.embedly import EmbedlyFinder as EmbedlyFinder +from wagtail.embeds.finders.embedly import AccessDeniedEmbedlyException, EmbedlyException +from wagtail.embeds.finders.oembed import OEmbedFinder as OEmbedFinder +from wagtail.embeds.models import Embed +from wagtail.embeds.rich_text import MediaEmbedHandler +from wagtail.embeds.templatetags.wagtailembeds_tags import embed_tag try: import embedly # noqa @@ -44,7 +44,7 @@ class TestGetFinders(TestCase): @override_settings(WAGTAILEMBEDS_FINDERS=[ { - 'class': 'wagtail.wagtailembeds.finders.oembed' + 'class': 'wagtail.embeds.finders.oembed' } ]) def test_new_find_oembed(self): @@ -55,7 +55,7 @@ class TestGetFinders(TestCase): @override_settings(WAGTAILEMBEDS_FINDERS=[ { - 'class': 'wagtail.wagtailembeds.finders.embedly', + 'class': 'wagtail.embeds.finders.embedly', 'key': 'foo', } ]) @@ -68,7 +68,7 @@ class TestGetFinders(TestCase): @override_settings(WAGTAILEMBEDS_FINDERS=[ { - 'class': 'wagtail.wagtailembeds.finders.oembed', + 'class': 'wagtail.embeds.finders.oembed', 'options': {'foo': 'bar'} } ]) @@ -176,7 +176,7 @@ class TestChooser(TestCase, WagtailTestUtils): self.assertEqual(r.status_code, 200) self.assertContains(r, 'value=\\"http://example2.com\\"') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_submit_valid_embed(self, get_embed): get_embed.return_value = Embed(html='', title="An example embed") @@ -187,7 +187,7 @@ class TestChooser(TestCase, WagtailTestUtils): self.assertContains(response, """modal.respond('embedChosen'""") self.assertContains(response, """An example embed""") - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_submit_unrecognised_embed(self, get_embed): get_embed.side_effect = EmbedNotFoundException @@ -375,7 +375,7 @@ class TestOembed(TestCase): class TestEmbedTag(TestCase): - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_direct_call(self, get_embed): get_embed.return_value = Embed(html='') @@ -383,7 +383,7 @@ class TestEmbedTag(TestCase): self.assertEqual(result, '') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_call_from_template(self, get_embed): get_embed.return_value = Embed(html='') @@ -392,7 +392,7 @@ class TestEmbedTag(TestCase): self.assertEqual(result, '') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_catches_embed_not_found(self, get_embed): get_embed.side_effect = EmbedNotFoundException @@ -428,7 +428,7 @@ class TestEmbedBlock(TestCase): serialized_empty_val = block.get_prep_value(None) self.assertEqual(serialized_empty_val, '') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_render(self, get_embed): get_embed.return_value = Embed(html='

Hello world!

') @@ -445,7 +445,7 @@ class TestEmbedBlock(TestCase): # Check that get_embed was called correctly get_embed.assert_any_call('http://www.example.com/foo') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_render_within_structblock(self, get_embed): """ When rendering the value of an EmbedBlock directly in a template @@ -543,7 +543,7 @@ class TestMediaEmbedHandler(TestCase): self.assertEqual(result, {'url': 'test-url'}) - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_expand_db_attributes_for_editor(self, get_embed): get_embed.return_value = Embed( url='http://www.youtube.com/watch/', @@ -575,7 +575,7 @@ class TestMediaEmbedHandler(TestCase): self.assertIn('

Author: test author name

', result) self.assertIn('test title', result) - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_test_expand_db_attributes_for_editor_catches_embed_not_found(self, get_embed): get_embed.side_effect = EmbedNotFoundException @@ -586,7 +586,7 @@ class TestMediaEmbedHandler(TestCase): self.assertEqual(result, '') - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_expand_db_attributes(self, get_embed): get_embed.return_value = Embed( url='http://www.youtube.com/watch/', @@ -607,7 +607,7 @@ class TestMediaEmbedHandler(TestCase): ) self.assertIn('test html', result) - @patch('wagtail.wagtailembeds.embeds.get_embed') + @patch('wagtail.embeds.embeds.get_embed') def test_expand_db_attributes_catches_embed_not_found(self, get_embed): get_embed.side_effect = EmbedNotFoundException diff --git a/wagtail/wagtailembeds/urls.py b/wagtail/embeds/urls.py similarity index 85% rename from wagtail/wagtailembeds/urls.py rename to wagtail/embeds/urls.py index db08ce20f2..16a64ab839 100644 --- a/wagtail/wagtailembeds/urls.py +++ b/wagtail/embeds/urls.py @@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals from django.conf.urls import url -from wagtail.wagtailembeds.views import chooser +from wagtail.embeds.views import chooser app_name = 'wagtailembeds' urlpatterns = [ diff --git a/wagtail/wagtailembeds/views/__init__.py b/wagtail/embeds/views/__init__.py similarity index 100% rename from wagtail/wagtailembeds/views/__init__.py rename to wagtail/embeds/views/__init__.py diff --git a/wagtail/wagtailembeds/views/chooser.py b/wagtail/embeds/views/chooser.py similarity index 89% rename from wagtail/wagtailembeds/views/chooser.py rename to wagtail/embeds/views/chooser.py index 8b6ea69806..631f01ddf8 100644 --- a/wagtail/wagtailembeds/views/chooser.py +++ b/wagtail/embeds/views/chooser.py @@ -4,11 +4,11 @@ from django.forms.utils import ErrorList from django.utils.translation import ugettext as _ from wagtail.admin.modal_workflow import render_modal_workflow -from wagtail.wagtailembeds.exceptions import ( +from wagtail.embeds.exceptions import ( EmbedNotFoundException, EmbedUnsupportedProviderException) -from wagtail.wagtailembeds.finders.embedly import AccessDeniedEmbedlyException, EmbedlyException -from wagtail.wagtailembeds.format import embed_to_editor_html -from wagtail.wagtailembeds.forms import EmbedForm +from wagtail.embeds.finders.embedly import AccessDeniedEmbedlyException, EmbedlyException +from wagtail.embeds.format import embed_to_editor_html +from wagtail.embeds.forms import EmbedForm def chooser(request): diff --git a/wagtail/wagtailembeds/wagtail_hooks.py b/wagtail/embeds/wagtail_hooks.py similarity index 91% rename from wagtail/wagtailembeds/wagtail_hooks.py rename to wagtail/embeds/wagtail_hooks.py index 9064a742e2..021e1a9636 100644 --- a/wagtail/wagtailembeds/wagtail_hooks.py +++ b/wagtail/embeds/wagtail_hooks.py @@ -6,8 +6,8 @@ from django.utils.html import format_html from wagtail.admin.rich_text import HalloPlugin from wagtail.core import hooks -from wagtail.wagtailembeds import urls -from wagtail.wagtailembeds.rich_text import MediaEmbedHandler +from wagtail.embeds import urls +from wagtail.embeds.rich_text import MediaEmbedHandler @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 336a4849f0..1229387279 100644 --- a/wagtail/project_template/project_name/settings/base.py +++ b/wagtail/project_template/project_name/settings/base.py @@ -31,7 +31,7 @@ INSTALLED_APPS = [ 'wagtail.wagtailforms', 'wagtail.wagtailredirects', - 'wagtail.wagtailembeds', + 'wagtail.embeds', 'wagtail.wagtailsites', 'wagtail.wagtailusers', 'wagtail.wagtailsnippets', diff --git a/wagtail/tests/settings.py b/wagtail/tests/settings.py index 431e39e1de..5f73eabe39 100644 --- a/wagtail/tests/settings.py +++ b/wagtail/tests/settings.py @@ -120,7 +120,7 @@ INSTALLED_APPS = ( 'wagtail.contrib.table_block', 'wagtail.wagtailforms', 'wagtail.wagtailsearch', - 'wagtail.wagtailembeds', + 'wagtail.embeds', 'wagtail.wagtailimages', 'wagtail.wagtailsites', 'wagtail.wagtailusers', diff --git a/wagtail/wagtailembeds/__init__.py b/wagtail/wagtailembeds/__init__.py deleted file mode 100644 index 4778906962..0000000000 --- a/wagtail/wagtailembeds/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = 'wagtail.wagtailembeds.apps.WagtailEmbedsAppConfig'