Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- encoding: utf-8 -*-
- from django.db.models import Field
- from django.forms import Textarea
- from settings import MEDIA_URL
- from cms.plugins.text.widgets.wymeditor_widget import WYMEditor
- class WYSIWYGField(Field):
- def get_internal_type(self):
- return "TextField"
- def formfield(self, **kwargs):
- defaults = {'widget': WYMEditor}
- defaults.update(kwargs)
- return super(WYSIWYGField, self).formfield(**defaults)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement