Skip to content

Commit

Permalink
added an actual homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
David Pick committed Aug 11, 2010
1 parent e6613f3 commit f9b8115
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion rose_schedule.py
Expand Up @@ -4,11 +4,22 @@
from datetime import time, date, datetime

class HomePage:
@cherrypy.expose
def index(self):
return '''
<a href="/nextperiod/">Time Till Next Period</a>
'''

class TimeTillNextPeriod:
@cherrypy.expose
def index(self):
tmpl = Template(file='rose_schedule_template.html')
tmpl.period = return_difference()
return str(tmpl)

cherrypy.quickstart(HomePage())
root = HomePage()
root.nextperiod = TimeTillNextPeriod()
cherrypy.tree.mount(root)

cherrypy.quickstart()

0 comments on commit f9b8115

Please sign in to comment.