2. Agenda
Thursday
10:30 Installing a Developer Environment
11:30 Building your own Applications
12:00 Lunch
13:00 Building your own Applications
13:30 Resources
14:00 Building your own Applications
14:30 Modifying existing Applications
15:45 Git and GitHub
16:25 Plan Breakout Sessions
17:00 Adjourn
SahanaCamp NYC 2
3. Agenda
Friday
09:00 Breakout Sessions
10:45 Code Sprint: Your Projects
12:00 Working Lunch
13:00 Next Steps
13:30 Community Resources
14:00 Adjourn
SahanaCamp NYC 3
4. Building your own
Applications
Fran Boon
fran@sahanafoundation.org
SahanaCamp NYC 4
5. Whitespace Matters
Unlike other languages which use parentheses to
delimit code blocks {...}, Python instead uses White
Space
SahanaCamp NYC 5
21. Module Index Page
views/training/index.html
{{extend "layout.html"}}
<H1>Welcome to the Training Module</H1>
<UL>
<LI>Browse the Course List
</UL>
HTML with Python inside {{..}}
Extend layout.html for basic look and feel
SahanaCamp NYC 21
22. Module Index Page
views/training/index.html
{{extend "layout.html"}}
<H2>Welcome to the Training Module</H2>
<UL>
<LI>Browse the {{=A("Course List",
_href=URL(c="training", f="course"))}}
</UL>
SahanaCamp NYC 22
29. Modifying Existing
Applications
Fran Boon
fran@sahanafoundation.org
SahanaCamp NYC 29
30. Which file do I edit?
Each module will have:
Model: modules/eden/modulename.py
View: views/modulename/index.html
There may be additional view files for custom pages
Controller: controllers/modulename.py
SahanaCamp NYC 30