mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 20:09:25 +00:00
Move markdown input and select widgets to a widget folder
This commit is contained in:
15
core/views/widgets/markdown.py
Normal file
15
core/views/widgets/markdown.py
Normal file
@ -0,0 +1,15 @@
|
||||
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("webpack/core/components/easymde-index.ts"),
|
||||
"css": staticfiles_storage.url("webpack/core/components/easymde-index.css"),
|
||||
}
|
||||
return context
|
Reference in New Issue
Block a user