October 2009
2 posts
Using widgets in web2py (integrating CKEditor)
Although web2py comes with an integrated editor, I really like ckeditor and using it for a text field is trivial using widgets!
First, install ckeditor (put the ckeditor inside a js/ckeditor file in your static folder and include it) :
<script type=”text/javascript”...
Creating a dropdown with country names in web2py
There are many ways to create a dropdown that includes all countries in web2py but the most pythonic way goes like this:
Create a module (let’s name it countries.py) and put a list of countries :
COUNTRIES=(‘United States’, ‘Afghanistan’, ‘Albania’, ‘Algeria’, ‘Andorra’, ‘Angola’, ‘Antigua and Barbuda’,...