tcms.core.widgets module

Custom widgets for Django

class tcms.core.widgets.DurationWidget(attrs=None)[source]

Bases: django.forms.widgets.Widget

class Media[source]

Bases: object

css = {'all': ['bootstrap-duration-picker/dist/bootstrap-duration-picker.css']}
js = ['bootstrap-duration-picker/dist/bootstrap-duration-picker.js']
format_value(value)[source]

Return a value as it should appear when rendered in a template.

media
template_name = 'widgets/duration.html'
class tcms.core.widgets.SimpleMDE(attrs=None)[source]

Bases: django.forms.widgets.Textarea

SimpleMDE widget for Django

class Media[source]

Bases: object

css = {'all': ['simplemde/dist/simplemde.min.css', 'prismjs/themes/prism.css']}
js = ['simplemde/dist/simplemde.min.js', 'marked/marked.min.js', 'prismjs/prism.js', 'prismjs/plugins/autoloader/prism-autoloader.min.js', 'js/simplemde_security_override.js']
file_upload_id = 'simplemde-file-upload'
media
render(name, value, attrs=None, renderer=None)[source]

Render the widget as an HTML string.