Module Expr Str ImportFrom alias alias alias ImportFrom alias alias Import alias Import alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str Return BinOpMod Str TupleLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Num Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str NameLoad NameLoad body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareIn Str AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareNotIn NameLoad NameLoad body Assign NameStore BinOpMod Str NameLoad Return NameLoad Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Dict Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Assign NameStore BinOpMod Str NameLoad orelse If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Str keyword BinOpMod Str TupleLoad Str NameLoad orelse Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Return NameLoad decorator_list decorator_list
N/A N/A 
    flask-ckeditor
    ~~~~~~~~~~~~~~

        Flask love CKEditor
 flask request url_for make_response werkzeug secure_filename SharedDataMiddleware N/A os N/A random N/A datetime CKEditor N/A object N/A N/A 
    class CKEditor
    ~~~~~~~~~~~~~~

        from flask import Flask
        from flaskckeditor import CKEditor
        from flask.ext.wtf import Form
        from wtforms import SubmitField, TextareaField

        app = Flask(__name__)

        class EditForm(Form, CKEditor):
            body = TextareaField()
            submit = SubmitField('submit')

        @app.route('/ckupload/', methods=['POST'])
        def ckupload():
            form = EditForm()
            response = form.upload(name=app)
            return response

     __init__ N/A N/A self N/A N/A N/A nothing to init N/A N/A gen_rnd_filename N/A N/A self N/A N/A N/A generate a random filename by time N/A filename_prefix N/A N/A N/A N/A N/A datetime datetime now strftime %Y%m%d%H%M%S N/A N/A %s%s N/A filename_prefix N/A str N/A N/A random randrange 1000 10000 N/A upload N/A N/A self name path folder allowed_extensions max_size N/A None None upload None None N/A N/A 
        ckeditor upload method
        :name: the app name or blueprint name
        :path: the upload path
        :allowed_extensions: allowed file extensions
        :max_size: the max size of uploaded file
         N/A error N/A url N/A callback N/A N/A N/A request args get CKEditorFuncNum N/A N/A N/A N/A request method POST N/A upload N/A request files N/A N/A fileobj N/A N/A request files N/A upload N/A N/A fname fext N/A N/A N/A os path splitext N/A fileobj filename N/A N/A allowed_extensions N/A fext allowed_extensions N/A N/A error N/A %s not in the allowed extensions! fext N/A error N/A rnd_name N/A %s%s N/A N/A N/A self gen_rnd_filename fext N/A N/A path N/A N/A filepath N/A N/A N/A os path join N/A name static_folder upload rnd_name N/A N/A filepath path N/A N/A N/A app add_url_rule /ckupload/<filename> uploaded_file build_only True N/A N/A app wsgi_app N/A SharedDataMiddleware N/A app wsgi_app N/A /ckupload/ path N/A dirname N/A N/A N/A os path dirname filepath N/A N/A N/A N/A N/A os path exists dirname N/A N/A N/A N/A N/A N/A os makedirs dirname N/A N/A N/A N/A error N/A path <%s> not exist! filepath N/A N/A N/A N/A N/A os access dirname N/A os W_OK N/A N/A error N/A path <%s> not writable filepath N/A N/A error N/A N/A N/A N/A fileobj save filepath N/A url N/A url_for .static filename N/A %s/%s N/A upload rnd_name N/A N/A error post error N/A res N/A 
                <script type="text/javascript">
                    window.parent.CKEDITOR.tools.callFunction('%s', '%s', '%s');
                </script>
              N/A callback url error N/A response N/A make_response res N/A N/A N/A response headers N/A Content-Type text/html N/A response N/A N/A