-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmembros.py
73 lines (61 loc) · 1.94 KB
/
membros.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import webapp2
import urllib
from google.appengine.ext import db
class Usuario(db.Model):
nomerl = db.StringProperty()
nomelol = db.StringProperty()
lvl = db.IntegerProperty()
liga = db.StringProperty()
tier = db.StringProperty()
Top = db.StringProperty()
Mid = db.StringProperty()
ADC = db.StringProperty()
Support = db.StringProperty()
Jungler = db.StringProperty()
Normal3 = db.StringProperty()
Ranked3 = db.StringProperty()
Normal5 = db.StringProperty()
Ranked5 = db.StringProperty()
Normald = db.StringProperty()
ARAM = db.StringProperty()
class membros(webapp2.RequestHandler):
def get(self):
f = open('inicio', 'r')
inicio = f.read()
f = open('fim', 'r')
fim = f.read()
tat = ""
x = Usuario.all()
for usr in x:
t = "<tr>"
t += "<td>" + str(usr.nomerl.encode('utf-8')) + "</td>"
t += "<td>" + str(usr.nomelol.encode('utf-8')) + "</td>"
t += "<td>" + str(usr.lvl) + "</td>"
t += "<td>" + str(usr.liga) + "</td>"
t += "<td>" + str(usr.tier) + "</td>"
t += "<td>" + str(usr.Top) + "<br>" + str(usr.Mid) + "<br>" + str(usr.ADC) + "<br>" + str(usr.Support ) + "<br>" + str(usr.Jungler) + "</td>"
t += "<td>" + str(usr.Normal3) + "<br>" + str(usr.Ranked3) + "<br>" + str(usr.Normal5) + "<br>" + str(usr.Ranked5) + str(usr.Normald) + "<br>" + str(usr.ARAM) + "</td>"
t += "</tr>"
tat = tat + " " + t
page = """
<h1>Membros:</h1>
<table class="table">
<thead>
<tr>
<th>Nome na RL</th>
<th>Nome no LoL</th>
<th>Level</th>
<th>Liga</th>
<th>Tier</th>
<th>Role(s)</th>
<th>Tipo de partida</th>
</tr>
</thead>
<tbody>
%s</p>
"""%tat
self.response.write(inicio)
self.response.write(page)
self.response.write(fim)
app = webapp2.WSGIApplication([('/membros', membros)],
debug=True)