django-codemirror-widget
django-codemirror-widget copied to clipboard
Trying to get this widget working in a view
Hello
I am trying to get the codemirror widget working on a form that I am deisplaying in a view, but following the doc, am probably missing a detail that does not exist.
I am calling the widget from the form class that I use to overwrite a generic view (CreateView). The app is added to settings.py and the codemirror_path is added as well.
Despite all this, am still not able to get it working properly.
Any clear direction on how to get this working in a view ? Is there any loading that should be done in the master html or in the block being rendered ?
An example would be more than welcome
Thanks
Ok ! Actually we need to load individually all parts included in the rendering. As we pass the mode and the theme to the class it would be great to have something like a custom tag :
{% load codemirror %}
that can go to a header or something rather than doing it manually
I'm sorry but I don't really get what you want. What the exact problem is?
When you follow the steps in the readme, and you try to render a codemirror instance in a form inside a view, it wont work, unless you manually call the js and css assets in the header of the html.
Which version of Python, Django, OS do you use?
am using python 2.7 with Django 1.9, on a macbook pro (yosemite)
Ok, I'll check the behavior