[web2py] Problem with form.process().accepted ?

2013-04-05 Thread Nguyen Minh Tuan
Hi! I'm newbie with web2py. I do tutorial in FORM chapter Model db.define_table('person', Field('personname', 'string', requires = IS_NOT_EMPTY())) Controller : def index(): form = SQLFORM(db.person) if form.process().accepted: sess

[web2py] Re: Problem with form.process().accepted ?

2013-04-07 Thread Nguyen Minh Tuan
Thanks Anthony, When I submit with blank data, no error msg displayed. I expected error msg displayed because I set this field mandatory as below db.define_table('person', Field('personname', 'string', requires = IS_NOT_EMPTY())) I found that : if form.process().accepted: always return false

[web2py] Re: Problem with form.process().accepted ?

2013-04-08 Thread Nguyen Minh Tuan
). If it works in that case, then there's a problem with the > session cookie and/or session. > > Anthony > > On Sunday, April 7, 2013 11:41:02 PM UTC-4, Nguyen Minh Tuan wrote: >> >> Thanks Anthony, >> When I submit with blank data, no error msg displayed. >>

[web2py] Re: Custom forms controller and view separation of concerns

2013-04-09 Thread Nguyen Minh Tuan
Hi Anthony, I try to custom view by using form.custom, But I have trouble in format control, Ex : I want to set textbox size to 10 or whatever Can I add more attributes to form.custom.widget.fieldname? Thanks, Tuan. On Sunday, October 7, 2012 9:44:57 PM UTC+7, Anthony wrote: > Depending on

Re: [web2py] Re: Custom forms controller and view separation of concerns

2013-04-09 Thread Nguyen Minh Tuan
name['_size']=10 > > will yield: > > "text" value="" /> > > Anthony > > > On Tuesday, April 9, 2013 5:42:49 AM UTC-4, Nguyen Minh Tuan wrote: >> >> Hi Anthony, >> >> I try to custom view by using form.custom, &g

[web2py] Re: how to display the value of a reference field, instead of the id in sqlform.grid

2013-05-03 Thread Nguyen Minh Tuan
Hi Anthony, This is seem not work in case self reference. Ex : Field('boss', 'reference auth_user') How can I solve in this situation? Thanks, On Monday, October 8, 2012 9:17:49 AM UTC+7, dave wrote: > Thank you very much, I did not see this in the documentation and yes it > would be nic

[web2py] Re: SQLFORM.grid and export; some proposals

2013-05-23 Thread Nguyen Minh Tuan
> > Hi, I want to use export feature in SQLFORM.grid, but it doesn't work when query in self reference table. db.py : auth.settings.extra_fields['auth_user'] = [ Field('LineManager', 'reference auth_user'), . controller.py : lineMng = db.auth_user.with_alias('lineMng')

[web2py] Re: new feature in trunk

2013-12-31 Thread Nguyen Minh Tuan
I tried to use with MS SQL but this function seem error! On Thursday, October 24, 2013 3:35:38 PM UTC+7, Arnon Marcus wrote: > > How would this work internally? > What queries would be generated? > How many queries would be generated? > At what points in time would queries be "executed"? > Would

[web2py] Re: There were changes in MS SQLServer driver?

2014-05-20 Thread Nguyen Minh Tuan
Hi Jose, I'm now have the same error with you. and cannot connect to MSSQL server, I've read your self answer but can not understand. Can you help me? db = DAL('mssql://usr1:pwd1@192.168.0.52/database_1') environment : - CentOS 6.4 - Python 2.7.6 - Web2py 2.9.5 Thanks, Tuan. On Saturday, Octo

Re: [web2py] Re: There were changes in MS SQLServer driver?

2014-05-27 Thread Nguyen Minh Tuan
rg/dev/peps/pep-0249/#footnotes > > On Tuesday, May 20, 2014 10:17:09 PM UTC-7, Nguyen Minh Tuan wrote: >> >> Hi Jose, >> >> I'm now have the same error with you. >> and cannot connect to MSSQL server, I've read your self answer but can >> not unders

[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2014-06-15 Thread Nguyen Minh Tuan
I am having this issue too! Server : CentOS 6.5 Apache : 2.2 Python : 2.6.6 Web2py : 2.95 So, I think this error caused by Apache config. Look into error log file, I found msg like : "...*client denied by server configuration*: /var/www/web2py/wsgihandler.py ..." I've changed in httpd.conf file

[web2py] Re: tip of the day. The power of routes

2014-06-22 Thread Nguyen Minh Tuan
Hi Massimo, I think there is error in your script : CURRENT line 69 : ('.*:https?://(.*\.)?%s:$method /$anything' % domain, '%s/$anything' % path) should be : ('.*:https?://(.*\.)?%s:$method /%s/$anything' % (domain, app), '/%s/$anything' % app) Regards, Tuan On Monday, October 25, 2010 11:04

Re: [web2py] Re: tip of the day. The power of routes

2014-07-03 Thread Nguyen Minh Tuan
Hi Massimo, Lyn2py posted above is that issue I met, I post complete script : (I mark the only one line I changed with red color) -- routes.py --- config = ''' site1.com.vn /hhp/default site2.com.vn /welcome/default ''' def auto_in(apps): routes = [

Re: [web2py] Re: tip of the day. The power of routes

2014-07-06 Thread Nguyen Minh Tuan
oot this. > > > > On Friday, July 4, 2014 9:59:37 AM UTC+8, Nguyen Minh Tuan wrote: > >> Hi Massimo, >> >> Lyn2py posted above is that issue I met, I post complete script : >> (I mark the only one line I changed with red color) >> >> ---

[web2py] Nginx proxy for Apache error

2015-09-17 Thread Nguyen Minh Tuan
Hi, I setup Web2py with Apache successfully, but when I setup a Nginx proxy for Apache server I get error : --- (getattr(): attribute name must be string) Traceback (most recent call last): File "C:\web2py\gluon\main.py", line 436, in wsgibase se

Re: [web2py] Re: Nginx proxy for Apache error

2015-09-18 Thread Nguyen Minh Tuan
Hi Leonel, I want nginx will stand as proxy server. Note : when I add more node in upstream, it works normally! On 18 September 2015 at 14:40, Leonel Câmara wrote: > Why don't you setup web2py with nginx directly using uwsgi-emperor? > There's no need to have apache involved. > > -- > Resource

[web2py] Re: alias field names

2015-10-03 Thread Nguyen Minh Tuan
Hi all, My situation is that I have to work with already defined tables. There is a field name 'pass', this is keyword of Python, I don't how to solve this. So I think alias for table field is necessary. Anyone can suggest for this situation? Thanks in advance! Regards, Tuan. -- Resources: -