Skip to content

Commit

Permalink
add wagtail transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Sep 19, 2024
1 parent 25e5ea9 commit f661027
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
21 changes: 11 additions & 10 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,15 +840,6 @@

SITE_ID = 1

WAGTAIL_RICHTEXT_FIELD_FEATURES = [
"h2",
"h3",
"bold",
"italic",
"link",
"image",
"embed",
]

WAGTAILEMBEDS_RESPONSIVE_HTML = True

Expand Down Expand Up @@ -881,7 +872,6 @@
"embed",
]

WAGTAILEMBEDS_RESPONSIVE_HTML = True
WAGTAIL_MODERATION_ENABLED = False
WAGTAILMENUS_FLAT_MENUS_HANDLE_CHOICES = (
("header_tools", "Menu en haut à droite"),
Expand All @@ -906,7 +896,18 @@

WAGTAILIMAGES_EXTENSIONS = ["gif", "jpg", "jpeg", "png", "webp", "svg"]

WAGTAILTRANSFER_SOURCES = {
"staging": {
"BASE_URL": os.getenv("WAGTAILTRANSFER_SOURCES_STAGING_URL", ""),
"SECRET_KEY": os.getenv("WAGTAILTRANSFER_SOURCES_STAGING_SECRET", ""),
},
"production": {
"BASE_URL": os.getenv("WAGTAILTRANSFER_SOURCES_PROD_URL", ""),
"SECRET_KEY": os.getenv("WAGTAILTRANSFER_SOURCES_PROD_SECRET", ""),
},
}

WAGTAILTRANSFER_SECRET_KEY = os.getenv("WAGTAILTRANSFER_SOURCES_PROD_SECRET", "7cd5de8229be75e1e0c2af8abc2ada7e")
# Specific home and purchasing impact page is setted here to avoid queries on every page
SIAE_HOME_PAGE = env.str("SIAE_HOME_PAGE", "/accueil-structure/")
PURCHASING_IMPACT_PAGE = env.str("PURCHASING_IMPACT_PAGE", "/impact-rse/")
Expand Down
2 changes: 2 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from wagtail import urls as wagtail_urls
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail_transfer import urls as wagtailtransfer_urls

from lemarche.utils.admin.admin_site import admin_site

Expand All @@ -24,6 +25,7 @@
path("blog/", include("blog.urls")),
# url docuemnts of glog
path("documents/", include(wagtaildocs_urls)),
path("wagtail-transfer/", include(wagtailtransfer_urls)),
# urls pages blog
path("", include("lemarche.www.pages.urls")),
path("", include(wagtail_urls)),
Expand Down
20 changes: 18 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pillow-heif = "^0.16.0"
wagtail-markdown = "^0.12.1"
wagtail-localize = "^1.9"
unidecode = "^1.3.8"
wagtail-transfer = "^0.9.4"

[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
Expand Down

0 comments on commit f661027

Please sign in to comment.