Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/wagtail-4.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller authored Aug 3, 2023
2 parents ba83fcd + 757f03c commit 648c52d
Show file tree
Hide file tree
Showing 12 changed files with 1,207 additions and 347 deletions.
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
reset-db:
psql -c 'DROP DATABASE djdb;'
psql -c 'ALTER USER dju CREATEDB;'
psql -c 'CREATE DATABASE djdb OWNER dju;'
python manage.py migrate
ifeq ($(USE_VENV),1)
EXEC_CMD :=
else
EXEC_CMD := docker-compose exec -ti web
endif

.PHONY: web-prompt
web-prompt:
docker-compose run --rm web bash
$(EXEC_CMD) bash

.PHONY: test-unit
test-unit:
python manage.py test --settings config.settings_test
$(EXEC_CMD) python manage.py test --settings config.settings_test

.PHONY: test-e2e
test-e2e:
python manage.py behave --settings config.settings_test
$(EXEC_CMD) python manage.py behave --settings config.settings_test

.PHONY: test
test: test-e2e test-unit

.PHONY: quality
quality:
black --check --exclude=venv .
isort --check --skip-glob="**/migrations" --extend-skip-glob="venv" .
flake8 --count --show-source --statistics --exclude=venv .
$(EXEC_CMD) black --check --exclude=venv .
$(EXEC_CMD) isort --check --skip-glob="**/migrations" --extend-skip-glob="venv" .
$(EXEC_CMD) flake8 --count --show-source --statistics --exclude=venv .

.PHONY: fix
fix:
black --exclude=venv .
isort --skip-glob="**/migrations" --extend-skip-glob="venv" .
$(EXEC_CMD) black --exclude=venv .
$(EXEC_CMD) isort --skip-glob="**/migrations" --extend-skip-glob="venv" .
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Content Manager
# Gestionnaire de contenu DSFR et Accessible

**Créez et gérez votre site internet simplement**

Gestionnaire de contenu (CMS) pour créer un site internet dont le domaine se terminant par .gouv.fr . Pas besoin de compétence technique pour mettre à jours le contenu.

**Un CMS basé sur la solution open source Wagtail**

Créez ou modifiez des pages, ajoutez un menu de navigation, des boutons, images, vidéos, contributeurs etc

**Système de Design de l'État**

Construisez vos pages à l'aide de composants prêts à l'emploi issus du Système de Design de l'État (DSFR)

**Accessible et responsive**

Le contenu des pages générées par le CMS est partiellement conforme selon la norme RGAA 4.1 et responsive





## Prérequis

Expand Down
32 changes: 16 additions & 16 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,20 @@
"django.contrib.staticfiles.finders.FileSystemFinder",
]

# S3 uploads
# S3 uploads & MEDIA CONFIGURATION
# ------------------------------------------------------------------------------

AWS_S3_ACCESS_KEY_ID = os.getenv("S3_KEY_ID", "123")
AWS_S3_SECRET_ACCESS_KEY = os.getenv("S3_KEY_SECRET", "secret")
AWS_S3_ENDPOINT_URL = (
f"{os.getenv('S3_PROTOCOL', 'https')}://{os.getenv('S3_HOST', 'set-var-env.com/')}"
)
AWS_STORAGE_BUCKET_NAME = os.getenv("S3_BUCKET_NAME", "set-bucket-name")
AWS_S3_STORAGE_BUCKET_REGION = os.getenv("S3_BUCKET_REGION", "fr")

# MEDIA CONFIGURATION
# ------------------------------------------------------------------------------

# See: https://docs.djangoproject.com/en/dev/ref/settings/#media-url
MEDIA_URL = f"https://{AWS_S3_ENDPOINT_URL}/" # noqa

DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
if os.getenv("S3_HOST"):
AWS_S3_ACCESS_KEY_ID = os.getenv("S3_KEY_ID", "123")
AWS_S3_SECRET_ACCESS_KEY = os.getenv("S3_KEY_SECRET", "secret")
AWS_S3_ENDPOINT_URL = f"{os.getenv('S3_PROTOCOL', 'https')}://{os.getenv('S3_HOST', 'set-var-env.com/')}"
AWS_STORAGE_BUCKET_NAME = os.getenv("S3_BUCKET_NAME", "set-bucket-name")
AWS_S3_STORAGE_BUCKET_REGION = os.getenv("S3_BUCKET_REGION", "fr")
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
MEDIA_URL = f"https://{AWS_S3_ENDPOINT_URL}/" # noqa
else:
DEFAULT_FILE_STORAGE = "django.core.files.storage.FileSystemStorage"
MEDIA_URL = "medias/"

# Django Sass
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, "static")
Expand Down Expand Up @@ -216,3 +212,7 @@

WAGTAILEMBEDS_RESPONSIVE_HTML = True
WAGTAIL_MODERATION_ENABLED = False

CSRF_TRUSTED_ORIGINS = []
for host in ALLOWED_HOSTS:
CSRF_TRUSTED_ORIGINS.append("https://" + host)
129 changes: 32 additions & 97 deletions content_manager/migrations/0001_initial.py

Large diffs are not rendered by default.

Loading

0 comments on commit 648c52d

Please sign in to comment.