diff --git a/src/CreeDictionary/CreeDictionary/templatetags/creedictionary_extras.py b/src/CreeDictionary/CreeDictionary/templatetags/creedictionary_extras.py index a94946b37..d21a5b870 100644 --- a/src/CreeDictionary/CreeDictionary/templatetags/creedictionary_extras.py +++ b/src/CreeDictionary/CreeDictionary/templatetags/creedictionary_extras.py @@ -16,7 +16,7 @@ ) from morphodict.relabelling import read_labels from morphodict.utils import url_for_query -from CreeDictionary.morphodict.templatetags.morphodict_orth import orth_tag +from morphodict.orthography.templatetags.morphodict_orth import orth_tag from morphodict.lexicon.models import Wordform register = template.Library() diff --git a/src/CreeDictionary/CreeDictionary/templatetags/relabelling.py b/src/CreeDictionary/CreeDictionary/templatetags/relabelling.py index 239ef5b3e..74e66d7a3 100644 --- a/src/CreeDictionary/CreeDictionary/templatetags/relabelling.py +++ b/src/CreeDictionary/CreeDictionary/templatetags/relabelling.py @@ -9,7 +9,7 @@ from django.template import Context from morphodict.relabelling import read_labels -from CreeDictionary.morphodict.templatetags.morphodict_orth import orth_tag +from morphodict.orthography.templatetags.morphodict_orth import orth_tag from morphodict.utils.types import FSTTag from crkeng.app.preferences import DisplayMode diff --git a/src/CreeDictionary/morphodict/README.md b/src/CreeDictionary/morphodict/README.md deleted file mode 100644 index 3bb2d58aa..000000000 --- a/src/CreeDictionary/morphodict/README.md +++ /dev/null @@ -1,17 +0,0 @@ -morphodict -========== - -The **morpho**logical **dict**ionary application. - - -Usage ------ - -Add it to the `INSTALLED_APPS` in your Django settings: - -```python -INSTALLED_APPS = [ - # other apps - "morphodict.apps.MorphodictConfig", -] -``` diff --git a/src/CreeDictionary/morphodict/apps.py b/src/CreeDictionary/morphodict/apps.py deleted file mode 100644 index 19d0d3426..000000000 --- a/src/CreeDictionary/morphodict/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class MorphodictConfig(AppConfig): - name = "CreeDictionary.morphodict" diff --git a/src/CreeDictionary/morphodict/paradigms.py b/src/CreeDictionary/morphodict/paradigms.py deleted file mode 100644 index 350977c18..000000000 --- a/src/CreeDictionary/morphodict/paradigms.py +++ /dev/null @@ -1,2 +0,0 @@ -1# todo: -# define a specification that other language specific apps implement to produce paradigms. diff --git a/src/CreeDictionary/morphodict/templatetags/__init__.py b/src/CreeDictionary/morphodict/templatetags/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/CreeDictionary/morphodict/tests/__init__.py b/src/CreeDictionary/morphodict/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/crkeng/app/integration_tests/test_relabel_with_orthography.py b/src/crkeng/app/integration_tests/test_relabel_with_orthography.py index 07712ae08..794cefb97 100644 --- a/src/crkeng/app/integration_tests/test_relabel_with_orthography.py +++ b/src/crkeng/app/integration_tests/test_relabel_with_orthography.py @@ -4,7 +4,7 @@ from CreeDictionary.CreeDictionary.orthography import to_macrons, to_syllabics from morphodict.paradigm.panes import RowLabel -from CreeDictionary.morphodict.orthography import ORTHOGRAPHY +from morphodict.orthography import ORTHOGRAPHY from pytest_django.asserts import assertInHTML from crkeng.app.preferences import DisplayMode diff --git a/src/morphodict/orthography/orthography.py b/src/morphodict/orthography/__init__.py similarity index 100% rename from src/morphodict/orthography/orthography.py rename to src/morphodict/orthography/__init__.py diff --git a/src/morphodict/orthography/apps.py b/src/morphodict/orthography/apps.py new file mode 100644 index 000000000..b06903d84 --- /dev/null +++ b/src/morphodict/orthography/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class OrthographyConfig(AppConfig): + name = "morphodict.orthography" diff --git a/src/CreeDictionary/morphodict/__init__.py b/src/morphodict/orthography/templatetags/__init__.py similarity index 100% rename from src/CreeDictionary/morphodict/__init__.py rename to src/morphodict/orthography/templatetags/__init__.py diff --git a/src/morphodict/orthography/templatetags/morphodict_orth.py b/src/morphodict/orthography/templatetags/morphodict_orth.py index e7f22075e..7125cd21a 100644 --- a/src/morphodict/orthography/templatetags/morphodict_orth.py +++ b/src/morphodict/orthography/templatetags/morphodict_orth.py @@ -2,7 +2,7 @@ from django.conf import settings from django.utils.html import format_html -from ..orthography import ORTHOGRAPHY +from morphodict.orthography import ORTHOGRAPHY register = template.Library() diff --git a/src/morphodict/orthography/urls.py b/src/morphodict/orthography/urls.py index 944155890..3468a5c12 100644 --- a/src/morphodict/orthography/urls.py +++ b/src/morphodict/orthography/urls.py @@ -2,7 +2,7 @@ from . import views -app_name = "morphodict" +app_name = "morphodict.orthography" urlpatterns = [ path( "change-orthography", diff --git a/src/morphodict/orthography/views.py b/src/morphodict/orthography/views.py index 95701c669..711276a7c 100644 --- a/src/morphodict/orthography/views.py +++ b/src/morphodict/orthography/views.py @@ -6,7 +6,7 @@ from django.http import HttpResponse from django.views import View -from .orthography import ORTHOGRAPHY +from morphodict.orthography import ORTHOGRAPHY class ChangeOrthography(View): diff --git a/src/morphodict/site/settings.py b/src/morphodict/site/settings.py index 395e08890..609c6f967 100644 --- a/src/morphodict/site/settings.py +++ b/src/morphodict/site/settings.py @@ -80,7 +80,7 @@ "morphodict.cvd", "morphodict.search_quality", "morphodict.phrase_translate", - "CreeDictionary.morphodict.apps.MorphodictConfig", + "morphodict.orthography", # This comes last so that other apps can override templates "django.contrib.admin", ] @@ -98,7 +98,7 @@ "morphodict.site.securemiddleware.set_secure_headers", ] -ROOT_URLCONF = "CreeDictionary.CreeDictionary.urls" +ROOT_URLCONF = "morphodict.urls" TEMPLATES = [ { diff --git a/src/CreeDictionary/morphodict/tests/test_morphodict_init.py b/src/morphodict/tests/test_morphodict_init.py similarity index 71% rename from src/CreeDictionary/morphodict/tests/test_morphodict_init.py rename to src/morphodict/tests/test_morphodict_init.py index b30b1eb3f..f0b468f4c 100644 --- a/src/CreeDictionary/morphodict/tests/test_morphodict_init.py +++ b/src/morphodict/tests/test_morphodict_init.py @@ -12,5 +12,5 @@ def test_default_config_exists(): """ A really trivial "test case": just checking that the app can be instantiated. """ - app = AppConfig.create("CreeDictionary.morphodict.apps.MorphodictConfig") - assert "morphodict" in app.name + app = AppConfig.create("morphodict.orthography.apps.OrthographyConfig") + assert "orthography" in app.name diff --git a/src/morphodict/tests/test_orth_cookie.py b/src/morphodict/tests/test_orth_cookie.py index cc245ee52..4a005d731 100644 --- a/src/morphodict/tests/test_orth_cookie.py +++ b/src/morphodict/tests/test_orth_cookie.py @@ -7,7 +7,7 @@ import pytest from django.urls import reverse -from CreeDictionary.morphodict.orthography import ORTHOGRAPHY +from morphodict.orthography import ORTHOGRAPHY @pytest.mark.parametrize( @@ -62,4 +62,4 @@ def test_no_orthography(client, change_orth_url): @pytest.fixture def change_orth_url(): - return reverse("morphodict:change-orthography") + return reverse("morphodict.orthography:change-orthography") diff --git a/src/morphodict/tests/test_orth_templatetags.py b/src/morphodict/tests/test_orth_templatetags.py index becb17980..f229f9e10 100644 --- a/src/morphodict/tests/test_orth_templatetags.py +++ b/src/morphodict/tests/test_orth_templatetags.py @@ -2,7 +2,7 @@ # -*- coding: UTF-8 -*- import pytest -from CreeDictionary.morphodict.templatetags.morphodict_orth import orth +from morphodict.orthography.templatetags.morphodict_orth import orth def test_orth_requires_two_arguments(): diff --git a/src/morphodict/tests/test_usage_of_morphodict.py b/src/morphodict/tests/test_usage_of_morphodict.py index 195641b9a..8d2baa7b2 100644 --- a/src/morphodict/tests/test_usage_of_morphodict.py +++ b/src/morphodict/tests/test_usage_of_morphodict.py @@ -3,7 +3,7 @@ """ import pytest -from CreeDictionary.morphodict.orthography import ORTHOGRAPHY +from morphodict.orthography import ORTHOGRAPHY def test_morphodict_orthography(): diff --git a/src/morphodict/urls.py b/src/morphodict/urls.py index 80bcfcde8..81c7cd98d 100644 --- a/src/morphodict/urls.py +++ b/src/morphodict/urls.py @@ -51,7 +51,7 @@ ############################## Other applications ############################## path("admin/", admin.site.urls), path("search-quality/", include("morphodict.search_quality.urls")), - path("", include("CreeDictionary.morphodict.urls")), + path("", include("morphodict.orthography.urls")), path("", include("morphodict.api.urls")), path( "sitemap.xml",