Script loading for Python applications with Django support
server_tag
app to your INSTALLED_APPS
in your Django settings.py
:
settings.py
(recommended for production):
server_tag_tags
and use the server_tag
tag:
render_script
parameter to customize how script tags are rendered:
settings.py
:
server_tag
template tag accepts these parameters:
Parameter | Type | Default | Description |
---|---|---|---|
remote_url | string | Required | URL to fetch script configuration from |
cache_timeout | number | 300 | Cache duration in seconds |
render_script | function | None | Custom script rendering function |