Skip to content

Commit

Permalink
Merge pull request #6291 from akatsoulas/remove-wagtail
Browse files Browse the repository at this point in the history
Remove wagtail from the code-base
  • Loading branch information
akatsoulas authored Oct 16, 2024
2 parents c017fd9 + e92c5a9 commit 3c433fe
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 536 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.16 on 2024-10-14 03:54

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("products", "0019_alter_singleproductindexpage_body"),
]

operations = [
migrations.RemoveField(
model_name="sumoplaceholderpage",
name="page_ptr",
),
migrations.DeleteModel(
name="SingleProductIndexPage",
),
migrations.DeleteModel(
name="SumoPlaceholderPage",
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
from kitsune.sumo.urlresolvers import reverse
from kitsune.sumo.utils import webpack_static

from wagtail.models import PreviewableMixin

HOT_TOPIC_SLUG = "hot"


Expand All @@ -29,7 +27,7 @@ class Meta:
abstract = True


class Product(BaseProductTopic, PreviewableMixin):
class Product(BaseProductTopic):
codename = models.CharField(max_length=255, blank=True, default="")
slug = models.SlugField()
image = ImagePlusField(
Expand Down
2 changes: 0 additions & 2 deletions kitsune/products/models/__init__.py

This file was deleted.

137 changes: 0 additions & 137 deletions kitsune/products/models/pages.py

This file was deleted.

74 changes: 0 additions & 74 deletions kitsune/products/tests/test_wt_pages.py

This file was deleted.

2 changes: 0 additions & 2 deletions kitsune/products/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from product_details import product_details

from kitsune.products.models import Product, Topic, TopicSlugHistory
from kitsune.sumo.decorators import prefer_cms
from kitsune.wiki.decorators import check_simple_wiki_locale
from kitsune.wiki.facets import documents_for, topics_for
from kitsune.wiki.models import Document, Revision
Expand All @@ -23,7 +22,6 @@ def product_list(request):


@check_simple_wiki_locale
@prefer_cms
def product_landing(request, slug):
"""The product landing page."""
if slug == "firefox-accounts":
Expand Down
27 changes: 0 additions & 27 deletions kitsune/products/wagtail_hooks.py

This file was deleted.

55 changes: 0 additions & 55 deletions kitsune/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import dj_database_url
import django_cache_url
from decouple import Csv, config
from wagtail.admin.localization import WAGTAILADMIN_PROVIDED_LANGUAGES

from kitsune.lib.sumo_locales import LOCALES

Expand Down Expand Up @@ -447,10 +446,6 @@ def immutable_file_test(path, url):
"django_jinja.builtins.extensions.StaticFilesExtension",
"django_jinja.builtins.extensions.DjangoFiltersExtension",
"jinja2.ext.i18n",
"wagtail.jinja2tags.core",
"wagtail.admin.jinja2tags.userbar",
"wagtail.images.jinja2tags.images",
"wagtail.contrib.settings.jinja2tags.settings",
],
"policies": {
"ext.i18n.trimmed": True,
Expand Down Expand Up @@ -515,7 +510,6 @@ def immutable_file_test(path, url):
"kitsune.users.middleware.LogoutInvalidatedSessionsMiddleware",
"csp.middleware.CSPMiddleware",
"dockerflow.django.middleware.DockerflowMiddleware",
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
)

# SecurityMiddleware settings
Expand Down Expand Up @@ -554,7 +548,6 @@ def immutable_file_test(path, url):
AUTHENTICATION_BACKENDS = ("kitsune.sumo.readonlyauth.ReadOnlyBackend",)
OIDC_ENABLE = False
ENABLE_ADMIN = False
WAGTAIL_ENABLE_ADMIN = False
else:
OIDC_ENABLE = config("OIDC_ENABLE", default=True, cast=bool)
ENABLE_ADMIN = config("ENABLE_ADMIN", default=OIDC_ENABLE, cast=bool)
Expand Down Expand Up @@ -1315,51 +1308,3 @@ def filter_exceptions(event, hint):
"MOZILLA_LOCATION_SERVICE",
default="https://location.services.mozilla.com/v1/country?key=fa6d7fc9-e091-4be1-b6c1-5ada5815ae9d", # noqa
)

# Wagtail settings
WAGTAIL_ENABLE = config("WAGTAIL_ENABLE", default=False, cast=bool)
WAGTAIL_ENABLE_ADMIN = config("WAGTAIL_ENABLE_ADMIN", default=False, cast=bool)
WAGTAIL_I18N_ENABLED = True
WAGTAIL_CONTENT_LANGUAGES = LANGUAGES
WAGTAILADMIN_PERMITTED_LANGUAGES = [
# Only include items in this list that SuMO supports and that are included
# in wagtail.admin.localization.WAGTAILADMIN_PROVIDED_LANGUAGES. These are
# only used by Wagtail for localizing its admin interface.
("ar", "Arabic"),
("ca", "Catalan"),
("cs", "Czech"),
("de", "German"),
("el", "Greek"),
("en", "English"),
("es", "Spanish"),
("et", "Estonian"),
("fi", "Finnish"),
("fr", "French"),
("gl", "Galician"),
("hr", "Croatian"),
("hu", "Hungarian"),
("id-id", "Indonesian"),
("it", "Italian"),
("ja", "Japanese"),
("ko", "Korean"),
("lt", "Lithuanian"),
("nl", "Dutch"),
("fa", "Persian"),
("pl", "Polish"),
("pt-br", "Brazilian Portuguese"),
("pt-pt", "Portuguese"),
("ro", "Romanian"),
("ru", "Russian"),
("sv", "Swedish"),
("sk-sk", "Slovak"),
("sl", "Slovenian"),
("th", "Thai"),
("tr", "Turkish"),
("uk", "Ukrainian"),
("zh-hans", "Chinese (Simplified)"),
("zh-hant", "Chinese (Traditional)"),
]
WAGTAIL_SITE_NAME = config("WAGTAIL_SITE_NAME", default="Mozilla Support CMS")
WAGTAILADMIN_BASE_URL = config("WAGTAILADMIN_BASE_URL", default="")
WAGTAILIMAGES_MAX_UPLOAD_SIZE = IMAGE_MAX_FILESIZE
WAGTAILDOCS_DOCUMENT_MODEL = "sumo.WagtailDocument"
Loading

0 comments on commit 3c433fe

Please sign in to comment.