Closed Nighttraveler closed 4 years ago
Hi guys I followed the docs here https://neutronx.github.io/django-markdownx/customization/ to customize my widget, I tested it with just a div
<div class="markdownx asd"> <div class="ASD"> {% include 'django/forms/widgets/textarea.html' %} </div> </div>
the override is in ./templates/markdownx/widget.html This is my template config in settings.py
./templates/markdownx/widget.html
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ]
my pip freeze
pip freeze
asgiref==3.2.8 astroid==2.4.2 cffi==1.14.0 cryptography==2.9.2 Django==2.2 django-markdownx==3.0.1 django-rest-knox==4.1.0 djangorestframework==3.11.0 isort==4.3.21 lazy-object-proxy==1.4.3 Markdown==3.2.2 mccabe==0.6.1 Pillow==7.1.2 pycparser==2.20 pylint==2.5.3 pytz==2020.1 six==1.15.0 sqlparse==0.3.1 toml==0.10.1 wrapt==1.12.1
Please let me know if i am missing something! Thanks!
In your settings.py file make sure the app django.forms has been added. Additionally set FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
settings.py
django.forms
FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'
That solved my issue, thanks nathaniel!
Hi guys I followed the docs here https://neutronx.github.io/django-markdownx/customization/ to customize my widget, I tested it with just a div
the override is in
./templates/markdownx/widget.html
This is my template config in settings.pymy
pip freeze
Please let me know if i am missing something! Thanks!