Changes between Version 3 and Version 4 of DeveloperGuidelines
- Timestamp:
- 12/20/08 03:22:12 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines
v3 v4 1 Web2Py: 2 -http://mdp.cti.depaul.edu/examples/static/cookbook.pdf3 -http://mdp.cti.depaul.edu/examples/static/web2py_cheatsheet.pdf1 == Web2Py == 2 * http://mdp.cti.depaul.edu/examples/static/cookbook.pdf 3 * http://mdp.cti.depaul.edu/examples/static/web2py_cheatsheet.pdf 4 4 5 MVC (like Rails) 5 This is an MVC environment (like Rails). 6 6 7 Model 8 Defines databases in: /models/db.py(equivalent of inst/mysql-dbcreate.sql)7 === Model === 8 Defines databases in: {{{/models/module.py}}} (equivalent of inst/mysql-dbcreate.sql) 9 9 10 Controller 11 12 10 === Controller === 11 Python functions in /controllers/module.py 12 e.g. 13 13 {{{ 14 14 def list_records(): … … 16 16 return dict (list=list) 17 17 }}} 18 View 19 HTML/Javascript templates in /views/module/function.html 18 19 === View === 20 HTML/Javascript templates in /views/module/function.html 20 21 - these are normal HTML/JS files with the ability to add in Python code (e.g. variables) surrounded by brackets: {{ interpreted python here }} 21 22 - there should be an .html file available for each function in the module (name normally being the same as the function)