I know it should be possible since all the editing pages on PA have it. And for my simple uses, I'd be content enough to just use full paths to the pythonanywhere served javascript/css if I could then determine the proper settings to add this option to my form's textarea served from within my django app in PA. Anyone accomplished that? I honestly don't know if PA is using pure jQuery codemirror or the djangocodemirror from 0.5.2http://pypi.python.org/pypi/djangocodemirror.
I've tried the long route myself trying to use djangocodemirror and hit a brick wall. I made a git clone and was following the directions at http://pypi.python.org/pypi/djangocodemirror . After putting a copy of everything in the static file in the clone in my static folder for my app, making a separate app folder in myproject folder with the djangocodemirror folder that held settings_local.py, forms.py, models.py & etc, and adding the app to my app list in settings.py in myproject folder (although kept giving a sever error when I followed the directions to list 'djangocodemirror' and instead listed 'myproject.djangocodemirror'), I get the error 'No module named djangocodemirror.fields' when I try to add code making such a form in my views.py file. Here is my code in views.py that seems to be causing the issue: :::python from djangocodemirror.fields import CodeMirrorWidget
class CodeMirrorSampleForm(forms.Form):
content = forms.CharField(label="Your content", widget=CodeMirrorWidget(codemirror_only=True, codemirror_attrs={'lineNumbers':True}))
def save(self, *args, **kwargs):
return