Improved form in stream and corrected a bug in web.py

This commit is contained in:
Thomas FORGIONE 2015-04-12 21:46:02 +02:00
parent 7b98fe724b
commit 8f923cb757
3 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@
<p>
You can try with a different resolution (between 1 and 25)
<form action="" method="GET">
Resolution : <input id="res" name="res" type="number" min="1" max="25" value="5" length=10/>
Resolution : <input id="res" name="res" type="number" min="1" max="25" value="%(res)s" length=10/>
<input type="submit" value="Go !" />
</form>
</p>

View File

@ -42,7 +42,7 @@ def main():
body.add_child(jsIncludes)
jsIncludes.add_child(mainJs)
page.print()
page.print({'res' : res})
if __name__ == '__main__':
main()

View File

@ -40,7 +40,7 @@ class Element:
self.children.append(child)
def print(self, format = {}):
self.open()
self.open(format)
for i in self.children:
i.print(format)
self.close()
self.close(format)