Skip to content

Commit

Permalink
There are now two applications : wagtail_design_system and sites_faciles
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Mann committed Nov 10, 2024
1 parent 5ba4a1e commit e288dd3
Show file tree
Hide file tree
Showing 105 changed files with 4,004 additions and 3,352 deletions.
39 changes: 23 additions & 16 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@

# Application definition
INSTALLED_APPS = [
"django_design_system.theme_designsystem",
"django_design_system.theme_lesgrandsvoisins",
"django_design_system",
"django.contrib.admin",
"django.contrib.auth",
Expand All @@ -78,6 +76,7 @@
"storages",
"taggit",
"wagtail",
"wagtail_design_system",
"wagtail_localize.locales",
"wagtail_localize",
"wagtail_transfer",
Expand Down Expand Up @@ -147,10 +146,10 @@
"wagtail.contrib.settings.context_processors.settings",
"wagtailmenus.context_processors.wagtailmenus",
"django_design_system.context_processors.site_config",
"sites_faciles.context_processors.skiplinks",
"sites_faciles.context_processors.mega_menus",
"sites_faciles.context_processors.urlangs",
"sites_faciles.context_processors.sitevars",
"wagtail_design_system.context_processors.skiplinks",
"wagtail_design_system.context_processors.mega_menus",
"wagtail_design_system.context_processors.urlangs",
"wagtail_design_system.context_processors.sitevars",
],
},
},
Expand Down Expand Up @@ -278,15 +277,18 @@

WAGTAIL_SITE_NAME = os.getenv("APP_SITE_NAME", "Sites faciles")

# # Base URL to use when referring to full URLs within the Wagtail admin backend -
# # e.g. in notification emails. Don't include '/admin' or a trailing slash
# WAGTAILADMIN_BASE_URL = "%s://%s" % (os.getenv('APP_HOST_PROTO', 'https'),os.getenv('APP_HOST_DOMAIN', '0.0.0.0'),)
# Base URL to use when referring to full URLs within the Wagtail admin backend -
# e.g. in notification emails. Don't include '/admin' or a trailing slash
WAGTAILADMIN_BASE_URL = "%s://%s" % (
os.getenv("APP_HOST_PROTO", "https"),
os.getenv("APP_HOST_DOMAIN", "0.0.0.0"),
)

# HOST_PORT = os.getenv("DJANGO_HOST_PORT", "8000")
# if HOST_PORT != "":
# WAGTAILADMIN_BASE_URL = "%s:%s" % (WAGTAILADMIN_BASE_URL, HOST_PORT)
HOST_PORT = os.getenv("APP_HOST_PORT", "443")
if HOST_PORT != "":
WAGTAILADMIN_BASE_URL = "%s:%s" % (WAGTAILADMIN_BASE_URL, HOST_PORT)

WAGTAILADMIN_BASE_URL = "http://0.0.0.0"
# WAGTAILADMIN_BASE_URL = "http://0.0.0.0"

# Disable Gravatar service
WAGTAIL_GRAVATAR_PROVIDER_URL = None
Expand Down Expand Up @@ -331,12 +333,17 @@

CSRF_TRUSTED_ORIGINS = []
for host in ALLOWED_HOSTS:
CSRF_TRUSTED_ORIGINS.append("https://" + host)
CSRF_TRUSTED_ORIGINS.append(
os.getenv("APP_HOST_PROTO", "http") + "://" + host + ":" + os.getenv("APP_HOST_PORT", "8000")
)


print(CSRF_TRUSTED_ORIGINS)

SF_ALLOW_RAW_HTML_BLOCKS = os.getenv("SF_ALLOW_RAW_HTML_BLOCKS", "False").lower() == "true"

WAGTAILTRANSFER_UPDATE_RELATED_MODELS = [
# "sites_faciles.contentpage",
# "wagtail_design_system.contentpage",
"wagtailimages.image",
]

Expand All @@ -347,7 +354,7 @@
"auth.permission": ["codename"],
"auth.group": ["name"],
"auth.user": ["username"],
# "sites_faciles.ContentPage": ["locale", "slug", "content_type", "parent_id"],
# "wagtail_design_system.ContentPage": ["locale", "slug", "content_type", "parent_id"],
}

# if DEBUG and "localhost" in HOST_URL:
Expand Down
6 changes: 3 additions & 3 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


# from sites_faciles import urls as wagtailsites_faciles_urls
# from sites_faciles.views import SearchResultsView, TagsListView, TagView
# from wagtail_design_system.views import SearchResultsView, TagsListView, TagView


urlpatterns = [
Expand All @@ -37,7 +37,7 @@
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

urlpatterns += i18n_patterns(
path("", include("sites_faciles.urls")),
# path("", include("sites_faciles.sites_faciles_blog.urls", namespace="sites_faciles_blog")),
path("", include("wagtail_design_system.urls")),
# path("", include("wagtail_design_system.wagtail_design_system_blog.urls", namespace="wagtail_design_system_blog")),
prefix_default_language=True,
)
2 changes: 1 addition & 1 deletion sites_faciles/apps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.apps import AppConfig


class WagtailSitesFacilesConfig(AppConfig):
class SitesFacilesConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "sites_faciles"
Loading

0 comments on commit e288dd3

Please sign in to comment.