Skip to content

Commit

Permalink
Merge pull request #8 from giantryansaul/master
Browse files Browse the repository at this point in the history
updated example in the README
  • Loading branch information
j0ack committed Dec 12, 2016
2 parents 7e1927a + 442b410 commit dbbf38a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A simple example of how to use this module

.. code:: python
from flask.ext.wtf import form
from flask.ext.wtf import Form
from flask.ext.codemirror.fields import CodeMirrorField
from wtforms.fields import SubmitField
Expand All @@ -36,10 +36,13 @@ The `CodeMirrorField` works exactly like a `TextAreaField`
The module needs to be initialized in the usual way and can be configured using app.config keys

.. code:: python
from flask import Flask
from flask.ext.codemirror import CodeMirror
# mandatory
CODEMIRROR_LANGUAGES = ['python', 'html']
WTF_CSRF_ENABLED = True
SECRET_KEY = 'secret'
# optional
CODEMIRROR_THEME = '3024-day'
CODEMIRROR_ADDONS = (
Expand Down

0 comments on commit dbbf38a

Please sign in to comment.