If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!


  • 0
    tim-richardson  10 years ago

    You may also want to do this in db.py to get web2py to minify the static files. The ckeditor js is large:

     

    response.optimize_css = 'concat,minify,inline'

    response.optimize_js = 'concat,minify,inline'

    
    

     

    Also note that when you add the widget to the table, you will reference the table.

    If you have lazy_tables (and you should), then the line below should not go in a model because it will reference the table at every request, destroying the lazy_table advantage. Instead, put this is the controller function.

    db.page.body.widget = advanced_editor

     

     

Commented on:

Although web2py comes with an integrated editor, I really like ckeditor and using it for a text field is trivial using widgets!

Hosting graciously provided by:
Python Anywhere