[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: -

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

[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

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

2014-07-06 Thread Nguyen Minh Tuan
, 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) -- routes.py --- config = ''' site1.com.vn /hhp/default site2.com.vn

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 = [

[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

[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

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

2014-05-27 Thread Nguyen Minh Tuan
/#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 understand. Can you help me? db = DAL('mssql://usr1:pwd1@192.168.0.52/database_1

[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,

[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 that be

[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: 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 nice

[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
will yield: input class=string id=test_fieldname name=fieldname size=10 type= 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, But I have trouble in format control, Ex : I want to set

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

2013-04-08 Thread Nguyen Minh Tuan
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. I expected error msg displayed because I set this field mandatory as below db.define_table('person', Field('personname

[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

[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:

[web2py] How to intervene in web2py's upload process(store/retrieve/stream...) to do something with uploaded file?

2012-04-26 Thread Chu Duc Minh
My database is RDBMS, but i want to store uploaded file in a Key/Value storage(NoSQL). How can I intervene to web2py's store/retrieve process? I want temporarily store uploaded file in memory, then call my API to put this in-memory file to my Key/Value storage. When I put this in-memory

[web2py] Urlshortening appliance ERROR!

2012-04-13 Thread Chu Duc Minh
I download newest version web2py and download this appliance from https://github.com/mdipierro/web2py-appliances/tree/master/UrlShortening But when i run, i can't shorten URL. (No input form?) And when I click Bookmark button: type 'exceptions.KeyError' '127.0.0.1:8000' Traceback (most recent

[web2py] How to use SUM()

2010-03-09 Thread minh
I couldn't find much documentation on sum() and I'm not sure how to use it. If I have something like define_table('some_table', Field('amount', 'integer') ... I try db(...).select(db.some_table.amount.sum()) When I print it out, I get something like: SUM(some_table.amount) 300 How do I

[web2py] Helper functions

2010-03-03 Thread minh
I have functions in my controller that require no view and should be inaccessible through the browser, i.e: helper functions, callbacks, etc If the user tries to access the function through http://../app/controller/function, I'll either get an 'invalid function' or the return values. How do I

[web2py] Re: Ajax query

2010-03-02 Thread minh
I'm trying to implement the voting/rating example from the manual and I'm getting a similar issue with the page overlapping. On Mar 2, 2:26 pm, LB22 latn.bl...@googlemail.com wrote: Hi Thadeus, Thanks for your input. Perhaps you could provide a couple of examples, as I'm a little confused.

[web2py] Re: Ajax query

2010-03-02 Thread minh
: The manual is old in this respect. I assume you have seen this:http://web2py.com/plugins/default/rating On Mar 2, 4:36 pm, minh mdn0...@gmail.com wrote: I'm trying to implement the voting/rating example from the manual and I'm getting a similar issue with the page overlapping. On Mar 2, 2:26

[web2py] Re: Ajax query

2010-03-02 Thread minh
the thread btw :/ On Mar 2, 3:25 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not even remember what is in the manual. Plugins are the future... even if they may change. On Mar 2, 5:19 pm, minh mdn0...@gmail.com wrote: Should I disregard the example in the manual or is there a simple tweak

[web2py] Iterate through form input

2010-02-26 Thread minh
to iterate through the form elements so I don't have to worry about number/name of input fields? Thanks, Minh -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group

[web2py] Re: Iterate through form input

2010-02-26 Thread minh
I forgot to mention, the form loads fine... I get the error on submit. On Feb 26, 1:58 pm, minh mdn0...@gmail.com wrote: I have something like this:         form = FORM('Emails:', BR(),                     INPUT(_name='email', requires=IS_NULL_OR(IS_EMAIL())), BR

[web2py] StackExchange

2010-02-18 Thread minh
Just throwing this out there... I think StackExchange.com would make a good platform for web2py help/ discussion. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from

[web2py] Requiring arguments

2010-02-11 Thread minh
Is there a way to require arguments/vars in the controller functions other than explicitly checking for them? It would be nice if we could decorate the functions similar to how the auth works, ex: @require_arg_function(minargs=2, message=Invalid arguments) def some_function(): Thanks.

[web2py] Re: web2py site problem ?!

2010-02-11 Thread minh
Not loading for me (from San Diego, CA) On Feb 11, 4:08 pm, Jonathan Lundell jlund...@pobox.com wrote: On Feb 11, 2010, at 3:45 PM, mdipierro wrote: yes that works. Any EC2 expert around here? DNS is working fine for me. You might just need to wait a bit longer. On Feb 11, 4:51 pm,

[web2py] Re: DB query help

2010-02-10 Thread minh
field. You should be able to do: comments = db(db.post_comment.post_id==request.args(0)).select() for c in comments:     print c.comment_by.username,c.comment I don't think this works on GAE On Feb 9, 11:19 pm, minh mdn0...@gmail.com wrote: Hi, I have something along the lines

[web2py] Re: Unable to send email

2010-02-09 Thread minh
Nevermind... my virus scanner was blocking SMTP access from Python -_- On Feb 9, 11:47 am, minh mdn0...@gmail.com wrote: Hi, I am having problems with the e-mail verification while running on my local dev instance. Here are my settings: mail=Mail(globals

[web2py] Customizing User Registration Form

2010-02-09 Thread minh
Our user table has many fields, so when the Auth() form is auto- generated, there is a long form displayed on the page. I want to make it so that registration will be a 2-3 step process containing 2-3 forms. I was wondering what the best way to customize this form would be? Would it be best to

[web2py] DB query help

2010-02-09 Thread minh
Hi, I have something along the lines of db.define_table('post', ...) db.define_table('post_comment', Field('post_id', db.post), Field('comment_by', db.auth_user), Field('comment', 'text') I'm trying to list the comments along with the author's name. However, I'm having problems