Skip to content

Serve JS libs with static templatetag instead of hardcoded url#38

Closed
pierreben wants to merge 2 commits intoaboutcode-org:mainfrom
kapt-labs:fix/static-urls
Closed

Serve JS libs with static templatetag instead of hardcoded url#38
pierreben wants to merge 2 commits intoaboutcode-org:mainfrom
kapt-labs:fix/static-urls

Conversation

@pierreben
Copy link
Copy Markdown

I found a small issue in the default config where the static URLs are currently hardcoded :

    # Defaults to the bundled django-altcha file.
    "ALTCHA_JS_URL": "/static/altcha/altcha.min.js",
    # URL of the Altcha translations JavaScript file.
    # Defaults to the bundled django-altcha file.
    "ALTCHA_JS_TRANSLATIONS_URL": "/static/altcha/dist_i18n/all.min.js",

To address this, I implemented a lazy static URL loader, which allows the use of Django's static template tag within this configuration.

Signed-off-by: Benjamin PIERRE <contact@benjamin-pierre.dev>
Signed-off-by: Benjamin PIERRE <contact@benjamin-pierre.dev>
@pierreben
Copy link
Copy Markdown
Author

Hello,

Any news with this PR ?
Many thanks for your help

@tdruez
Copy link
Copy Markdown
Contributor

tdruez commented Apr 21, 2026

Hey @pierreben thanks for reporting and getting started on this one.
I've merged a fix in #45
Let me know if that approach works for you.

@tdruez tdruez closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants