mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 10:34:21 +00:00
16 lines
524 B
Python
16 lines
524 B
Python
from django.contrib.staticfiles.storage import staticfiles_storage
|
|
from django.forms import Textarea
|
|
|
|
|
|
class MarkdownInput(Textarea):
|
|
template_name = "core/widgets/markdown_textarea.jinja"
|
|
|
|
def get_context(self, name, value, attrs):
|
|
context = super().get_context(name, value, attrs)
|
|
|
|
context["statics"] = {
|
|
"js": staticfiles_storage.url("bundled/core/components/easymde-index.ts"),
|
|
"css": staticfiles_storage.url("bundled/easymde-index.css"),
|
|
}
|
|
return context
|