-
Notifications
You must be signed in to change notification settings - Fork 0
/
bottle_start.py
49 lines (26 loc) · 1.04 KB
/
bottle_start.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# sigep311@gmail.com wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return Cameron Goodale
# ----------------------------------------------------------------------------
# from bottle import route, run, template, get, post, request
# from datetime import date
# @route('/')
# @route('/demo')
# def simple_function():
# return "Demo is working"
# @route('/hey/')
# @route('/hey/<name>')
# def h1_hey(name="Amigo"):
# message = template("<h1>Hey there {{temp_name}}! Template</h1>", temp_name=name)
# # message = "<h1>Hey there %s!</h1>" % name
# return message
# @get('/<year:int>/<month:int>/<day:int>')
# def iso_formatter(year, month, day):
# input_date = date(year, month, day)
# request
# return request
# run(host='localhost',
# port=8080,
# debug=True, reloader=True)