Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Trying to get this widget working in a view #20

Open
radaniba opened this issue Dec 25, 2015 · 6 comments
Open

Trying to get this widget working in a view #20

radaniba opened this issue Dec 25, 2015 · 6 comments

Comments

@radaniba
Copy link

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

@radaniba
Copy link
Author

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

@lambdalisue
Copy link
Owner

I'm sorry but I don't really get what you want. What the exact problem is?

@radaniba
Copy link
Author

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.

@lambdalisue
Copy link
Owner

Which version of Python, Django, OS do you use?

@radaniba
Copy link
Author

am using python 2.7 with Django 1.9, on a macbook pro (yosemite)

@lambdalisue
Copy link
Owner

Ok, I'll check the behavior

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants