-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd.py
executable file
·53 lines (49 loc) · 1.49 KB
/
add.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
50
51
52
53
from bottle import route, request, get, post
from index import header0, do_add, list_tags, footer
def add_tags():
"""Returns add bmarks page/index content."""
return_data = ''
top = '''<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tasti</title>
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" type="text/css" href="jquery.validity.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.validity.js"></script>
<script type="text/javascript">
$(function() {{
$("form").validity(function() {{
$("#name")
.minLength(2, "Must be at least 2 characters") ;
$("#url")
.match("url","Requires a valid URL (http://...)")
.minLength(6, "Must be at least 6 characters");
}});
}});
</script>
</head>
<body><div id="wrapper">
<div id="header">'''
return_data += top
return_data += header0()
return_data += '''</div>
<div id="faux">
<div id="leftcolumn">'''
return_data += do_add()
return_data += '''<div class="clear"></div>
</div>
<div id="rightcolumn">
'''
return_data += list_tags()
return_data += '''<div class="clear"></div>
</div>
</div>
<div id="footer">'''
return_data += footer()
bottom = '''</div>
</div>
</body>
</html>'''
return_data += bottom
return return_data