mirror of
https://github.com/Hopiu/django-markdownx.git
synced 2026-05-03 02:54:42 +00:00
commit
5675fe27c8
3 changed files with 6 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import os
|
||||
import uuid
|
||||
import StringIO
|
||||
|
||||
|
||||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.utils.six import StringIO
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.files.uploadedfile import InMemoryUploadedFile
|
||||
from django.template import defaultfilters as filters
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ from .settings import MARKDOWNX_EDITOR_RESIZABLE
|
|||
class MarkdownxWidget(forms.Textarea):
|
||||
|
||||
def render(self, name, value, attrs=None):
|
||||
if attrs.has_key('class'):
|
||||
if attrs is None:
|
||||
attrs = {}
|
||||
elif 'class' in attrs:
|
||||
attrs['class'] += ' markdownx-editor'
|
||||
else:
|
||||
attrs.update({'class':'markdownx-editor'})
|
||||
|
|
|
|||
1
setup.py
1
setup.py
|
|
@ -29,6 +29,7 @@ setup(
|
|||
'Topic :: Software Development :: User Interfaces',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: JavaScript',
|
||||
],
|
||||
keywords='django markdown live preview images upload',
|
||||
|
|
|
|||
Loading…
Reference in a new issue