mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-05-17 17:21:05 +00:00
Update widget render attrs with attrs from widget instance before render
This commit is contained in:
parent
0074bb250b
commit
63f59beca3
1 changed files with 3 additions and 1 deletions
|
|
@ -54,11 +54,13 @@ class MarkdownxWidget(forms.Textarea):
|
|||
.. Note::
|
||||
Not accepting ``renderer`` is deprecated in Django 1.11.
|
||||
"""
|
||||
attrs.update(self.attrs)
|
||||
attrs.update(self.add_markdownx_attrs(attrs))
|
||||
|
||||
if is_post_10:
|
||||
return super(MarkdownxWidget, self).render(name, value, attrs, renderer)
|
||||
|
||||
attrs = self.build_attrs(attrs, name=name)
|
||||
attrs.update(self.add_markdownx_attrs(attrs))
|
||||
|
||||
widget = super(MarkdownxWidget, self).render(name, value, attrs)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue