Skip to content

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

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

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

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>
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.

1 participant