Add requirements.
Fix the following:

 * Use 'in' instead of 'has_key()'
 * Rename 'id' to '_id' because of 'id' is a python built-in function
Remove debug message.
Add urls() to generate urls.

 * Add get_suburl() to adjust parameter.