tiny doc imrpovement to asset api docs
@@ -24,13 +24,15 @@ def js(cls, text=None, call_target=None, **kwargs):
"""
To use this shortcut, pass `attrs__src='/my_url_to_the.js'`
- Example:
+ Examples:
.. code-block:: python
Asset.js(
attrs__src='https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/js/select2.min.js',
)
+
+ Asset.js('window.foo = bar')
"""
return call_target(text, **kwargs)
@@ -43,7 +45,7 @@ def css(cls, text=None, call_target=None, **kwargs):
"""
To use this shortcut, pass `attrs__href='/my_url_to_the.js'`
- Example:
+ Examples:
.. code-block:: python
@@ -52,5 +54,7 @@ def css(cls, text=None, call_target=None, **kwargs):
attrs__integrity='sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh',
attrs__crossorigin='anonymous',
)
+
+ Asset.css('p { font-size: 18pt; }')
"""
return call_target(text, **kwargs)
