POST is empty, bottle 0.8
from bottle import request, response, run, route
@route('/')
def cookie():
return '<html><body> <form action="/" method="POST" > <input type="TEXT" name="name" /> <input type="submit" /> </form> </body></html>'
@route('/', method='POST')
def set_cookie():
if ...
Die Suche ergab 14 Treffer
- Samstag 20. März 2010, 22:01
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
- Freitag 19. März 2010, 20:57
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
- Freitag 19. März 2010, 17:04
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
- Freitag 19. März 2010, 09:18
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
- Sonntag 7. Februar 2010, 11:54
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
Re: Encoding Error in Jinja-Template
Ein 'Ü' in einem Jinja2-Template brachte mir:
Unhandled Exception: UnicodeDecodeError('ascii',\xc3\x9cbersicht, 1138, 1139, 'ordinal not in range(128)')
Es hilft in bottle.py (Version 0.6.4) in Zeile 847 ein ".decode('utf-8')" anzuhängen. Siehe auch das Beispiel für einen
Jinja2 BaseLoader in der ...
Unhandled Exception: UnicodeDecodeError('ascii',\xc3\x9cbersicht, 1138, 1139, 'ordinal not in range(128)')
Es hilft in bottle.py (Version 0.6.4) in Zeile 847 ein ".decode('utf-8')" anzuhängen. Siehe auch das Beispiel für einen
Jinja2 BaseLoader in der ...
- Dienstag 2. Februar 2010, 05:34
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
time work for host 3:00 - 19:00 UTCLeonidas hat geschrieben:Ich würds ja mirrorn, aber der Host ist nicht verfügbarzoxzox3 hat geschrieben:wiki by bottle in 23 minuten
http://lega.selfip.com/page/23 (video 33Mb, Host ist nicht verfügbar, in der Nacht)
- Dienstag 2. Februar 2010, 05:19
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
- Montag 1. Februar 2010, 21:22
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
wiki by bottle in 23 minuten
http://lega.selfip.com/page/23 (video 33Mb, Host ist nicht verfügbar, in der Nacht)

http://lega.selfip.com/page/23 (video 33Mb, Host ist nicht verfügbar, in der Nacht)

- Sonntag 31. Januar 2010, 17:52
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
variant for loaded

Code: Alles auswählen
@route('/upload', method='POST')
def do_upload():
df = request.POST.get('datafile')
open('uploads/111.txt','wb').write( df.file.read() )
redirect('/',302)

- Sonntag 31. Januar 2010, 17:36
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
Code: Alles auswählen
@route('/upload', method='POST')
def do_upload():
df = request.POST.get('datafile')
return df.value
- Sonntag 31. Januar 2010, 17:33
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
- Mittwoch 27. Januar 2010, 06:32
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
Re: error in bottle.jinja2_template
error in bottle.jinja2_template
error find:
Bottle 0.6.4:
class Jinja2Template(BaseTemplate):
def loader(self, name):
if not name.endswith(".tpl"):
for path in self.lookup:
fpath = os.path.join(path, name+'.tpl')
if os.path.isfile(fpath):
name = fpath
break
f = open(name)
try: return f ...
error find:
Bottle 0.6.4:
class Jinja2Template(BaseTemplate):
def loader(self, name):
if not name.endswith(".tpl"):
for path in self.lookup:
fpath = os.path.join(path, name+'.tpl')
if os.path.isfile(fpath):
name = fpath
break
f = open(name)
try: return f ...
- Mittwoch 27. Januar 2010, 05:28
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
Re: error in bottle.jinja2_template
and mako not workzoxzox3 hat geschrieben:error in bottle.jinja2_template
this work code:
Code: Alles auswählen
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('views'))
print env.get_template('test1.tpl').render()
- Dienstag 26. Januar 2010, 18:27
- Forum: Showcase
- Thema: Bottle: Micro Web Framework
- Antworten: 593
- Zugriffe: 131741
error in bottle.jinja2_template
error in bottle.jinja2_template
code:
# coding: utf-8
from bottle import jinja2_template as template
print template('test1')
test1.tpl (utf-8 ru chars)
Тест строка
error:
>python test1.py
Traceback (most recent call last):
File "test1.py", line 5, in <module>
print template('test1')
File ...
code:
# coding: utf-8
from bottle import jinja2_template as template
print template('test1')
test1.tpl (utf-8 ru chars)
Тест строка
error:
>python test1.py
Traceback (most recent call last):
File "test1.py", line 5, in <module>
print template('test1')
File ...