Monthly Archives: October 2016

[Book]Python 201

Python 201 Advertisements

Posted in python | Leave a comment

custom form 생성하기

in order to apply attributes to a custom form you have to change form.custom.begin before. The following code should work: #view html {{extend ‘layout.html’}} {{ # add class to form form[‘_class’] = “form-horizontal” # change form.custom.begin form.custom.begin = XML(“<%s %s>” % (form.tag, form._xml()[0])) }}{{=form.custom.begin}} your content form {{=form.custom.end}} … Continue reading

Posted in python, web2py | Leave a comment

PDF파일을 첨부파일로 다운로그 하기

  pdf.output(name=request.folder+’/static/temp.pdf’)     response.headers[‘Content-Disposition’] = ‘attachment; filename=abc.pdf’# to force download as attachment # replace abc with whatever pdf name you want the user to see.     response.headers[‘Content-Type’]=’application/pdf’     return’/static/temp.pdf’,’rb’),chunk_size=4096)

Posted in python, web2py | Leave a comment

Database에 파일 저장하는 방법 2012-11-19 in model db.define_table(‘attachments’,         Field(‘attachment’, ‘upload’, uploadfield=’payload’),         Field(‘filename’, length=512),         Field(‘Description’, ‘text’),         Field(‘payload’, ‘blob’),         migrate=init_migrate,         ) … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

User accessed site without logging in

User accessed site without logging in 로긴한적없는 유저가 다른유저로 로긴되어 있는 현상 발생 알고봤더니 uWSGI의 async버그로 발생한 문제, uWSGI의 ipv6 address 처리 오류 forum: client ipaddress의 validation추가 git:

Posted in python, web2py | Leave a comment

web2py 2.0 rc – lazy table

Posted in Uncategorized | Leave a comment