Fields

evileg_core.fields module

class evileg_core.fields.EMarkdownField(html_field=None, *args, **kwargs)[source]

Bases: django.db.models.fields.TextField

This field save markdown text with auto-populate text to html field. This field must be used with second text field for html content. This field support django-modeltranslation package.

EMarkdownField can use upload_link and upload_file_link for invoke upload dialog from backend. Unfortunately, this mechanism is not fully developed for using like 3d party. We develop this in near future.

contribute_to_class(cls, name, **kwargs)[source]

Register the field with the model class it belongs to.

If private_only is True, create a separate instance of this field for every subclass of cls, even if cls is not an abstract model.

formfield(**kwargs)[source]

Return a django.forms.Field instance for this field.

set_markdown(instance=None, update_fields=None, **kwargs)[source]
class evileg_core.fields.EMarkdownFormField(documentation_link=None, placeholder=None, upload_link=None, upload_file_link=None, extended_mode=True, fullscreen=True, *args, **kwargs)[source]

Bases: django.forms.fields.CharField

EMarkdownFormField using in django forms