[web2py] PyDAL+MSSQL+FreeTDS: pyodbc.ProgrammingError

2019-09-27 Thread Wei Wang
acswitch FROM NacConnectionsView WHERE (NacConnectionsView.nacmacaddress LIKE '00%' ESCAPE '\\');" Where did that [ESCAPE '\\'] part came from? Thank you for any help! --Wei Wang -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] SAML2 Service Provider app in web2py?

2014-08-21 Thread Wei Wang
I have the need to use a SAML2 identity provider (specifically, a NetIQ product) for authentication and authorization in some web2py apps. I searched in this group, also googled "web2py and SAML", but did not find anything that seems readily available. My thoughts on building a "Service Provide

[web2py] /default/user/login not honoring "_next" anymore?

2014-06-23 Thread Wei Wang
s this an expected change? Thanks, -- Wei Wang -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Goo

[web2py] Re: An easy way to change "action" in user login form?

2014-02-13 Thread Wei Wang
login' Hopefully, this helps eliminating the possibility of the form causing a problem. On Wednesday, February 12, 2014 11:39:59 PM UTC-5, Wei Wang wrote: > > My web2py powered app is behind a reverse proxy (namely, NetIQ Access > Manager) for single sign-on. User authenticatio

[web2py] An easy way to change "action" in user login form?

2014-02-12 Thread Wei Wang
despite the fact that "#" is a perfectly legitimate self-pointing URL. In the spirit of getting over the problem, I am thinking of digging in the code and change the way that "action" is constructed. Before I spend time to do that, does anyone in the group have an easier

Re: [web2py] A correction needed in the web2py book

2014-01-23 Thread Wei Wang
Thanks. I didn't know the book is in Github. I forked it and edited the file, which is here: g...@github.com:ww9rivers/web2py-book.git -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/is

[web2py] How to reverse proxy with web2py?

2014-01-23 Thread Wei Wang
Hi, I am writing a web2py application, that pulls HTML output from another web app (specifically, Splunk web, if anyone cares). Here is the function that I have arrived at the moment: import requests as http def splunk(): kwargs = dict(verify=False) svc = request.get_vars.get('service'

[web2py] A correction needed in the web2py book

2014-01-23 Thread Wei Wang
Hi, There is an error in this section of the Reference Manual book: http://web2py.com/books/default/chapter/29/04/the-core#response Specifically, this: response.stream(file, chunk_size, request=request, attachment=False, filename=None, headers=None) does not match the function signature in th

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-29 Thread Wei Wang
Jonathan, I am embarrassed to report that is has been a user error -- my fault -- that I got two different versions of web2py running in the same instance of apache2. I didn't think to check my Apache configuration until I downloaded a stable version of the source, set it up and ran it manually

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-28 Thread Wei Wang
Just got a chance to try this: I copied the "midash/views/default/user.html" to"miops/views/default/user.html", reloaded the page at "/midash/user/login?_next=/midash/default/index", my user login page shows up. So I guess there is a bug somewhere in the routing code. -- --- You received th

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
"/midash/xyz/abc" gives me "invalid function (default/xyz)". "/midash/default/abcdefg" gives me "invalid function (default/abcdefg)". I just tried with a copy of the "user" function from "midash/controllers/default.py" to "miops/controllers/default.py". That gives me an error message that may b

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
VERSION = Version 2.6.0-development+timestamp.2013.08.15.10.05.27 On Tuesday, August 27, 2013 2:04:54 PM UTC-4, Jonathan Lundell wrote: > > On 27 Aug 2013, at 10:38 AM, Wei Wang > > wrote: > > On Tuesday, August 27, 2013 12:54:51 PM UTC-4, Jonathan Lundell wrote: >> >&

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
On Tuesday, August 27, 2013 12:54:51 PM UTC-4, Jonathan Lundell wrote: > > On 27 Aug 2013, at 9:47 AM, Wei Wang > > wrote: > > I have 2 simple apps: midash and miops. I intend to require user > authentication for accessing "midash" and not "miops". >

[web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
Here is the entire "routes.py" I have: routers = dict( BASE=dict( default_application='miops', ), ) logging = 'debug' if __name__ == '__main__': import doctest doctest.testmod() I am testing the web2py (Version 2.6.0-development+timestamp.2013.08.15.10.05.27) instance

[web2py] A possible bug in modpythonhandler.py?

2012-10-23 Thread Wei Wang
For reasons out of my control, I have to install web2py using mod_python. So I configured the following in an apache vhost file: Alias / /opt/web2py/ SetHandler python-program PythonHandler modpythonhandler PythonPath "sys.path+['/o

[web2py] Re: Help with db.import_from_csv_file()?

2011-06-19 Thread Wei Wang
OK. :-) Thanks!

[web2py] Re: Help with db.import_from_csv_file()?

2011-06-19 Thread Wei Wang
I think I may have found out why that was happening. In the latest version of dal.py, lines 4765-4766 read: elif field.type in ('double','integer'): value = None That basically eliminates any data of type double or integer. Commenting those two lines and restart web2

[web2py] Help with db.import_from_csv_file()?

2011-06-19 Thread Wei Wang
Greetings! I have a simple form, which takes in a CSV file name and upload the file for import to database. This is the code to import uploaded data: if form.accepts(request.vars, session): response.flash = 'Form accepted' db.import_from_csv_file(request.vars.csvfile.file)