Skip to content

Commit 725cae5

Browse files
committed
🔧(backend) add FRONTEND_CSS_URL env var
We added the `FRONTEND_CSS_URL` environment variable. It will give the possibility to add a css layer at runtime.
1 parent 3881930 commit 725cae5

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/backend/core/api/viewsets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,7 @@ def get(self, request):
16891689
"CRISP_WEBSITE_ID",
16901690
"ENVIRONMENT",
16911691
"FRONTEND_THEME",
1692+
"FRONTEND_CSS_URL",
16921693
"MEDIA_BASE_URL",
16931694
"POSTHOG_KEY",
16941695
"LANGUAGES",

src/backend/core/tests/test_api_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
COLLABORATION_WS_URL="http://testcollab/",
2020
CRISP_WEBSITE_ID="123",
2121
FRONTEND_THEME="test-theme",
22+
FRONTEND_CSS_URL="http://testcss/",
2223
MEDIA_BASE_URL="http://testserver/",
2324
POSTHOG_KEY={"id": "132456", "host": "https://eu.i.posthog-test.com"},
2425
SENTRY_DSN="https://sentry.test/123",
@@ -39,6 +40,7 @@ def test_api_config(is_authenticated):
3940
"CRISP_WEBSITE_ID": "123",
4041
"ENVIRONMENT": "test",
4142
"FRONTEND_THEME": "test-theme",
43+
"FRONTEND_CSS_URL": "http://testcss/",
4244
"LANGUAGES": [
4345
["en-us", "English"],
4446
["fr-fr", "Français"],

src/backend/impress/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ class Base(Configuration):
411411
None, environ_name="FRONTEND_THEME", environ_prefix=None
412412
)
413413

414+
FRONTEND_CSS_URL = values.Value(
415+
None, environ_name="FRONTEND_CSS_URL", environ_prefix=None
416+
)
417+
414418
# Posthog
415419
POSTHOG_KEY = values.DictValue(
416420
None, environ_name="POSTHOG_KEY", environ_prefix=None

src/frontend/apps/e2e/__tests__/app-impress/config.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const config = {
99
CRISP_WEBSITE_ID: null,
1010
COLLABORATION_WS_URL: 'ws://localhost:4444/collaboration/ws/',
1111
ENVIRONMENT: 'development',
12+
FRONTEND_CSS_URL: null,
1213
FRONTEND_THEME: 'default',
1314
MEDIA_BASE_URL: 'http://localhost:8083',
1415
LANGUAGES: [

0 commit comments

Comments
 (0)