class Script
from django.forms import Script
Ancestors (MRO)
- Script
- MediaAsset
Attributes
| Defined in | |
|---|---|
element_template = '<script src="{path}"{attributes}></script>'
|
Script |
element_template = '{path}'
|
MediaAsset |
Properties
def
path():
ΒΆ
MediaAsset
Getter
@property
def path(self):
"""
Ensure an absolute path.
Relative paths are resolved via the {% static %} template tag.
"""
if self._path.startswith(("http://", "https://", "/")):
return self._path
return static(self._path)