Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced some " with ' #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions filemanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class FileManagerForm(forms.Form):


class FileManager(object):
"""
'''
maxspace,maxfilesize in KB
"""
'''
idee = 0

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions filemanager/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

class CKEditorField(models.TextField):
def __init__(self, *args, **kwargs):
""" arguments config,filemanager_url can be passed here
''' arguments config,filemanager_url can be passed here
for the same use as of CKEditorWidget.
"""
'''
self.config = kwargs.pop('config', {})
self.filemanager_url = kwargs.pop('filemanager_url', '')
super(CKEditorField, self).__init__(*args, **kwargs)
Expand Down
10 changes: 5 additions & 5 deletions filemanager/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def filemanager_config(url):

class CKEditorWidget(forms.Textarea):
def __init__(self, attrs={}, config={}, filemanager_url=''):
""" config : CKEditor config
''' config : CKEditor config
filemanager_url : for user to 'browse server'
In config : toolbar = 'Basic'/'Standard'/'Full'
"""
'''
default = {
'toolbar': 'Standard',
'height': 250,
Expand All @@ -37,12 +37,12 @@ class Media:

def render(self, name, value, attrs=None):
rendered = super(CKEditorWidget, self).render(name, value, attrs)
div = "<div style='height:20px'></div>"
div = '<div style='height:20px'></div>'
return rendered + mark_safe(
div
+ u"""<script type="text/javascript">
+ u'''<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
CKEDITOR.replace('%s',%s);
}, false);
</script>""" % (attrs['id'], self.config)
</script>''' % (attrs['id'], self.config)
)