Changes between Version 6 and Version 7 of DeveloperGuidelines/Basics
- Timestamp:
- 07/04/13 10:12:01 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Basics
v6 v7 43 43 44 44 == Running a Sahana Eden Python Shell == 45 To open a Python Shell in the Sahana Eden Environment, where you can inspect Sahana Eden variableas well as access the data:45 To open a Python Shell in the Sahana Eden Environment, where you can inspect Web2Py and Sahana Eden variables as well as access the data: 46 46 {{{ 47 cd .. # the web2py main directory47 cd web2py 48 48 python web2py.py -S eden -M 49 49 }}} 50 50 To have database changes be persistent (e.g. to see via Web UI), you will need to commit the transactions: {{{db.commit()}}}. 51 51 52 == = Python ===52 == Python == 53 53 Indentation matters (use 4 spaces instead of Tabs) 54 54 * http://diveintopython.net … … 57 57 * Python v2 documentation: http://docs.python.org/ (We are currently using v2.7.) 58 58 59 == Web2Py == 60 This is an [http://en.wikipedia.org/wiki/Model-view-controller MVC] environment (like [http://web2py.com/AlterEgo/default/show/103 Rails] & [http://web2py.com/AlterEgo/default/show/101 Django]. [http://vimeo.com/6507384 Django polls tutorial conversion course]). 59 61 62 Web2Py can work at several different levels of abstraction.[[BR]] 63 The Sahana Eden framework (S3) is built on Web2Py's !Auth/Crud classes in {{{tools.py}}} (with some remnants of the older T2), however sometimes we need more control therefore need to drop down a level or two. 64 65 Can execute a controller to be able to access its functions using: 66 {{{ 67 execfile("applications/eden/controllers/mycontroller.py", globals()) 68 }}} 69 70 Web2Py can be extended through [http://www.web2py.com/plugins Plugins] & also has a [http://web2pyslices.com recipes site]. 71 72 * [http://web2py.com/book Web2py Book]