Форум сайта python.su
У меня есть два класса, каждый из которых возвращает штмл-ку
И третья, которой я пытаюсь создать страницу с фреймами.
[code python]class add_nakl2(webapp2.RequestHandler):
def post(self):
self.response.out.write('<html><body>')
st = '<br>'+'<form action="/add_strokuP" enctype="multipart/form-data" method="post"> <input type="submit", value = "Add"></form>'
self.response.out.write('<tr><th>Tovar<th><th>Count</th>Edin. izm.</th><th>Cena</th><th>Summa</th></tr>')
if self.session['parent_nakl']:
prnt = self.session['parent_nakl']
stroki = db.GqlQuery('SELECT * '
'FROM Pnakl_stroki ',
'WHERE prnt='+prnt+','
'ORDER BY tovar ')
for st in stroki:
self.response.out.write('<tr><th>Tovar<th><th>Count</th>Edin. izm.</th><th>Cena</th><th>Summa</th></tr>')
self.response.out.write('</table>')
self.response.out.write('</body></html>')
class add_nakl1(webapp2.RequestHandler):
def post(self):
self.response.out.write('<html><body><table>')
self.response.out.write('N <input type="text" name="nomer"> date <input type="date" name="date"><br>')
self.response.out.write('Kontragent <select>')
l = []
kontragenty = db.GqlQuery('SELECT * '
'FROM Kontragent '
'ORDER BY name ')
for kont in kontragenty:
self.response.out.write('<option value="'+kont.name+'">'+kont.name+'</option>')
st = '<br>'+'<form action="/save_pnakl" enctype="multipart/form-data" method="post"> <input type="submit", value = "Save"></form>'
self.response.out.write(st)
self.response.out.write('</body></html>')
class add_nakl(webapp2.RequestHandler):
def post(self):
st = '<html><body><frameset rows="260px,*"><frame name="nakladnye" src="/add_nakl">'
st = st +'<frame name="main" src="/add_nakl2">'
st = st +'</frameset></body></html>'
self.response.out.write(st)[/code]
<html><body><frameset rows="260px,*"><frame name="nakladnye" src="/add_nakl"><frame name="main" src="/add_nakl2"></frameset></body></html>
Офлайн