[web2py] Re: authentication variables in url when login is incorrect

2019-05-21 Thread Fred Nikolayevich
Ok I think I found it: In gluon/tools.py in the Auth.login() method the line 2643 has been changed from redirect(self.url(args=request.args, vars=request.*get_vars* ),client_side=settings.client_side) to redirect(self.url(args=request.args, vars=request.*vars* ),client_side=settings.client_sid

[web2py] authentication variables in url when login is incorrect

2019-05-21 Thread Fred Nikolayevich
erating the auth form with the basic 'form=auth()' in the user controller/view. Any ideas? Many thanks! Fred -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (R

[web2py] Web2py SQLFORM update or insert depending on record existence checked at callback...and side effects

2015-09-05 Thread fred . hiccup
ds/'+form.vars.f_temp_file) raises a TypeError: cannot concatenate 'str' and 'instance' objects whereas it just works like a charm when it is executed inside the controller, right after if form.process(dbio=False, onvalidation=onvalidation_insert_or_update).acc

[web2py] SQLFORM update or insert depending on record existence checked at callback... and side effects

2015-09-05 Thread fred . hiccup
oads/'+form.vars.f_temp_file) raises a TypeError: cannot concatenate 'str' and 'instance' objects whereas it just works like a charm when it is executed inside the controller, right after if form.process(dbio=False, onvalidation=onvalidation_insert_or_update). accepted: (How) can

Re: [web2py] Re: SQLFORM.grid, checkboxes and mor than one page

2014-02-03 Thread Fred Guedes Pereira
Hi, Martin, have you implemented a solution for this? Thanks. Em quinta-feira, 9 de agosto de 2012 01h30min58s UTC-3, mweissen escreveu: > > Ok, I will try it. Thank you! > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: return PDF content created from a blob field

2013-11-18 Thread Fred Guedes Pereira
r.fetchone() blobfield = row[0].read() #read() must be before the cursor.close()! cursor.close() return blobfield Fred Em segunda-feira, 18 de novembro de 2013 14h02min47s UTC-3, Fred Guedes Pereira escreveu: > > Hi Simone, > > It really is a PDF file (I checked)! It´s a le

[web2py] Re: return PDF content created from a blob field

2013-11-18 Thread Fred Guedes Pereira
4 decoded". When using the second one, the blob field is not read from DB. Do you know any way to read a native blob field using DAL without decode it ? Thanks a lot, Fred Em segunda-feira, 18 de novembro de 2013 12h53min39s UTC-3, Niphlod escreveu: > > you were the one saying that

[web2py] Re: return PDF content created from a blob field

2013-11-18 Thread Fred Guedes Pereira
a but!), the blob content (PDF) seems to be encoded. When I open the resulting downloaded file it is not recognized as a PDF file. I put a print just after retrieve the field from DB and it seems enconded (base64?). But it´s another problem. Fred Em quinta-feira, 14 de novembro de 2013 14h21min37s U

[web2py] Re: return PDF content created from a blob field

2013-11-18 Thread Fred Guedes Pereira
Thanks, Niphlod. Now it's clear for me, but I cant use response.stream() because it receives a filename, not a content, as parameter. Should I save the content into a local file first? Fred Em quinta-feira, 14 de novembro de 2013 14h21min37s UTC-3, Fred Guedes Pereira escreveu: >

[web2py] return PDF content created from a blob field

2013-11-14 Thread Fred Guedes Pereira
Hello, Is there a way to return PDF content generated from a blob db field? My table has a blob field whose content is PDF. I would like to create a 'PDF page' from those bytes and return it. Thanks, Sorry for possible duplication. Fred -- Resources: - http://web2py.

[web2py] Re: Grouping more than two fields in the same column of a smartgrid

2013-06-05 Thread Fred Guedes Pereira
Thanks, Massimo! On Tuesday, June 4, 2013 9:26:10 AM UTC-3, Massimo Di Pierro wrote: > > You can also do: > > db.protocol.region.represent = lambda v,r: > "%(region)s-%(sequence)s/%(year)s" % r.protocol > > > On Tuesday, 4 June 2013 07:19:07 UTC-5, Fred Gue

[web2py] Re: Grouping more than two fields in the same column of a smartgrid

2013-06-04 Thread Fred Guedes Pereira
esent in the grid´s field parameter (and only db.protocol.region must be present in the grid´s headers parameter) Fred On Wednesday, May 29, 2013 11:44:45 AM UTC-3, Fred Guedes Pereira wrote: > > Hi, > > Is there a way to group two or more table fields in the same column of a > SQ

[web2py] Grouping more than two fields in the same column of a smartgrid

2013-05-29 Thread Fred Guedes Pereira
. One more doubt: is it possible to hide that link (with the table name in plural) that smartgrids generate above the search panel? thank you, Fred -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this gr

[web2py] Re: Pass arg or var to Active directory related SQLFORM

2012-08-27 Thread Fred Kornyev
'GET', > _action=URL()) > > Then you can test to see whether the variable has been received: if > request.get_vars.ref > > If so, find the record and make a normal SQLFORM to display it. > > Hope it gives you an idea. > Regards, David > > >

[web2py] Pass arg or var to Active directory related SQLFORM

2012-08-27 Thread Fred Kornyev
Hello, we have a small issue with trying to pass an argument/variable to one of our function. It seems the solution should be simple, but we just can't figure it out! The idea is simple: we have an input field for a userID and when you submit is would pull data with the users other attributes (

[web2py] Web2Py Cookbook - Designing modular applications CORRECTION

2012-08-23 Thread Fred Kornyev
Hello! I was not able to find this information in one place so I had to piece it together, so I thought I would share it here: On page 94 in the Cookbook the "Designing modular applications" example has some mistakes and consequently the new item is not displayed automatically when using the c

[web2py] Re: Apache+virtualhosts+wsgi, loading always the same content

2012-04-05 Thread Fred
Did you use the required apache NameVirtualHost directive?

[web2py] Re: Apache/mod_wsgi: Exposing individual web2py apps alongside other non-web2py services

2012-02-22 Thread Fred
Note, that "$1" above should be on the same line as the WSGIScriptAliasMatch, right after the last "/" with no space. Similarly, the AliasMatch should be a single line. Posting the code here did an unexpected line wrap.

[web2py] Re: Apache/mod_wsgi: Exposing individual web2py apps alongside other non-web2py services

2012-02-21 Thread Fred
I faced something similar when I wanted to run two different versions of web2py (the framework itself) on one server. It worked well to use a pattern like this: WSGIScriptAliasMatch^/(someappname) /var/local/web2py/wsgihandler.py/ $1 AliasMatch ^/(someappname)/static/(.*) /v

[web2py] Re: what triggers a db migration

2012-02-21 Thread Fred
[Replying to old message; I'm way behind] On Jan 15, 1:21 am, pbreit wrote: > I think web2py compares the .table files to the > database to figure out what needs to be migrated. Is this correct? Everything I've seen suggests that web2py compares the .table files to the model files (models/*.py)

[web2py] Re: time value of 00:00:00 in MySQL interpreted as None

2010-09-15 Thread Fred
I updated to the current tip, changeset c98c7012176f, and now things work again the way they should: a MySQL time value of 00:00:00 is returned by DAL as datetime.time(0, 0) as it should be. Thank you.

[web2py] time value of 00:00:00 in MySQL interpreted as None

2010-09-14 Thread Fred
I've got an application that stores time of day and midnight (00:00:00) is a valid time that sometimes needs to be stored and retrieved. That used to work fine in an old release of web2py but in a recent release (1.84.4) such values are returned by DAL as None value rather than datetime.time(0,0)

[web2py] Re: New server

2010-08-09 Thread Fred
You might look at http://www.web2py.com/AlterEgo/default/show/239 as a basis.

[web2py:37450] Re: ldap authentication stopped working: "enter a valid email address"

2009-12-17 Thread Fred
Setting the new auth.settings.login_email_validate parameter seems to solve the problem. Thanks. -- 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, send

[web2py:37253] Re: ldap authentication stopped working: "enter a valid email address"

2009-12-15 Thread Fred
That IS_EMAIL() temporary validator is exactly what I *don't* want for LDAP authentication. -- 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, send email

[web2py:37239] Re: sign in form , email field validation problem

2009-12-15 Thread Fred
This patch seems to be causing me grief with LDAP authentication. See http://groups.google.com/group/web2py/browse_thread/thread/043083b6ae706f22 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@google

[web2py:37238] Re: ldap authentication stopped working: "enter a valid email address"

2009-12-15 Thread Fred
The Auth.login() method in tools.py is causing my grief. It's setting a temporary IS_EMAIL() validator on the auth_user.email field during login. I've been using the standard Auth tables along with LDAP authentication successfully, in production, for months. That scheme stores the LDAP username

[web2py:37194] ldap authentication stopped working: "enter a valid email address"

2009-12-14 Thread Fred
LDAP authentication has been working fine for my apps up through version 1.72.3. But when I use 1.73.1 I always get a validation error on-screen for my username (a.k.a email) input field saying "enter a valid email address". I see that the Auth define_tables() function puts the IS_EMAIL validator

[web2py:36533] Re: getting stable version equivalent from SVN

2009-12-04 Thread Fred
On Dec 4, 11:36 am, Jonathan Lundell wrote: > 1.71.3 never got released, but it does show up in the svn log at r1462 & > r1463, both 11/26. I meant to say 1.72.3. > Massimo: when you create a tag in svn, svn creates a snapshot of the tree at > the point of the tag. > > http://svnbook.red-bean.

[web2py:36497] Re: getting stable version equivalent from SVN

2009-12-04 Thread Fred
On Dec 3, 3:42 pm, Jonathan Lundell wrote: > Massimo is pretty good about announcing release versions in svn comments. I see now that there are quite a few SVN log entries with release version numbers. 1.71.3 wasn't there though and so I went with the process that I outlined above. But my proce

[web2py:36453] getting stable version equivalent from SVN

2009-12-03 Thread Fred
I think I've found a process that allows me to get a stable version of web2py from http://web2py.googlecode.com/svn/trunk. 1. Browse http://web2py.com/examples/default/download and look for the "current version" info. At the time of writing it's "1.72.3 (2009-11-10 09:17:13)". 2. Get the chang

[web2py:36452] Re: upgrade app

2009-12-03 Thread Fred
On Dec 1, 8:51 pm, mdipierro wrote: > People are supposed to use the stable distribution (not svn or bzr). I wish there was some way to pull stable distributions from the SVN repository. SVN "tags" would be good. Even a simple table that lists the revision number for each stable release would h

[web2py:34525] Re: how to disable soft cron when running mod_wsgi daemon

2009-11-03 Thread Fred
Thanks Graham, that's just what I needed to understand the ExecuteOnCompletion2 wrapper. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.

[web2py:34439] Re: how to disable soft cron when running mod_wsgi daemon

2009-11-02 Thread Fred
I set application = gluon.main.wsgibase as you suggested and that fixes the problem I reported in my original post above. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this

[web2py:34394] Re: how to disable soft cron when running mod_wsgi daemon

2009-11-02 Thread Fred
I am completely baffled by what ExecuteOnCompletion2 and callback do. Could someone explain their design? What do I lose by calling gluon.main.wsgibase directly? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web

[web2py:34246] Re: how to disable soft cron when running mod_wsgi daemon

2009-10-30 Thread Fred
In my testing, setting nocron=True in options_std.py or options.py has no effect in the mod_wsgi context. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web

[web2py:34242] how to disable soft cron when running mod_wsgi daemon

2009-10-30 Thread Fred
I've set up external cron per the v2 web2py manual and I've got web2py running (Version 1.68.2 (2009-10-27 13:05:52)) under mod_wsgi daemon mode. It looks to me like soft cron is still running in the daemon process. How do I shut it off? The options.py file seems to have no effect when using ws

[web2py:34238] Re: mod_wsgi web2py AliasMatch what serves the files apache/web2py?

2009-10-30 Thread Fred
On Oct 22, 7:09 pm, Graham Dumpleton wrote: > >http://www.web2py.com/AlterEgo/default/show/240 > > This page also has wrong information, you shouldn't be setting > WSGIPythonHome. I just changed that page to remove the reference to WSGIPythonHome. When I wrote that page I could not get web2py to

[web2py:33153] setting autocomplete="off" in login form

2009-10-19 Thread Fred
Given the security policy where I work I've been asked to try to disable the web browser feature that saves login passwords. It looks like setting the non-standard 'autocomplete' attribute to "off" for the login FORM element can do that for many browsers. I'm trying to figure out how to do that

[web2py:31470] Re: modules non reloaded

2009-09-22 Thread Fred
I have submitted a patch with a new WSGI handler for use with mod_wsgi that restarts the mod_wsgi daemon(s) whenever a module changes. Massimo is still considering that patch, I think. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[web2py:31258] Re: Authorization of multiple roles

2009-09-18 Thread Fred
Jose, I have an app with an auth/permission scheme similar to yours and it works fine. I assume that in your auth_permission data where you say "id_group" you mean "auth_permission.group_id". In that table, are the "table_name" column values blank? And are the "record_id" values 0? That's wha

[web2py:31001] Re: Authorization of multiple roles

2009-09-14 Thread Fred
> auth.add_permission('run_this',group_id=id.group('role1')) I don't think that works. I had to do this: auth.add_permission(auth.id_group('role1'), 'run_this') And that adds a new row to the auth_permission table every time it runs, so it should be run once and not added to the model as I

[web2py:30997] Re: yet another wiki with versioning and auth

2009-09-14 Thread Fred
I thought there was some new web2py wiki in the works being discussed in this thread. The one at https://code.launchpad.net/~mdipierro/web2py-wiki/trunk was last updated on 2009-03-12. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[web2py:30990] Re: yet another wiki with versioning and auth

2009-09-14 Thread Fred
Where is the current trunk repository for this web2py wiki? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this

[web2py:30774] Re: yet another wiki with versioning and auth

2009-09-11 Thread Fred
I uploaded the w2p file as a new app, but how do you get it going? The default/index page assumes that at least one wiki page exists already. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To p

[web2py:30514] Re: Default application with virtualhost

2009-09-09 Thread Fred
Jose, your setup appears to be missing the critical WSGI parts of that webfaction configuration example. See all the lines that have "WSGI" in them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" gro

[web2py:30420] Re: web2py complaints & rebuttals

2009-09-08 Thread Fred
I coded up Graham's suggestion and submitted it to Massimo as a patch. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe

[web2py:29707] Re: web2py book, 2nd Ed

2009-08-31 Thread Fred
When I search for "web2py" in the programming reddit the newest result is 6 days old. So your new post is not showing up. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group,

[web2py:29599] Re: can't import csv data file

2009-08-28 Thread Fred
The field names in the header of the CSV file have to match the table field names exactly. I could not import a CSV file when the header said "Foobar" and the field was defined as "FooBar". >From what I see in gluon/sql.py, 'id' column data is ignored. --~--~-~--~~~-

[web2py:28956] moving database to new server results in 'auth_user' already exists

2009-08-23 Thread Fred
I want to move a web2py database from one MySQL server to another. I dumped the database on the old server, loaded it into the new server, and created the database user with the necessary privileges. Then I changed the connection string in db.py to refer to the new server. It connects OK but I

[web2py:29013] Re: moving database to new server results in 'auth_user' already exists

2009-08-20 Thread Fred
I ended up doing this: Create empty database on new server. Change db.py to connect to that new database. Visit an application page in the browser; web2py creates the application tables in the database, empty. Dump the data from the old MySQL server with --no-create-info option (no table creation

[web2py:28958] Re: wsgi

2009-08-19 Thread Fred
mod_wsgi is great and Graham's documentation for it is really useful. I learned a lot by reading through his docs and his blog notes about mod_wsgi. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" grou

[web2py:28658] Re: Which Python library does web2py require for MySQL access?

2009-08-14 Thread Fred
Perhaps my notes on installing on CentOS 5 might offer some help: http://www.web2py.com/AlterEgo/default/show/239 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send ema

[web2py:28532] Re: filtering results of select, and CSV service

2009-08-13 Thread Fred
Thanks, that gave me the clue I needed. Since the as_list() method defaults to converting datetime values to strings and I want to use datetime methods on the values, I had to call it this way: requests = db().select(db.guest_request.ALL).as_list (datetime_to_str=False) The rest then worked

[web2py:28519] filtering results of select, and CSV service

2009-08-13 Thread Fred
resulting CSV file looks like this: description,created,update_record,mac_address,requester,id Fred testing,2009-08-13 10:57:31, at 0xb8b085a4>, 223344556677,fcy-st,29 The column headings all make sense except for the spurious 'update_record' one which does not correspond

[web2py:27956] Re: getting login form to use the label "Username" rather than "Email"

2009-08-04 Thread Fred
Perfect! Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr..

[web2py:27953] getting login form to use the label "Username" rather than "Email"

2009-08-04 Thread Fred
I'm using LDAP authentication where users login giving their username (uid in LDAP) and password. How can I get the login page (myapp/ default/user/login) to use the label "Username" rather than "Email"? I tried changing myapp/views/default/user.html to have the following but it doesn't work righ

[web2py:23224] Re: new slides

2009-06-03 Thread Fred
I find the white text a bit hard to read against that textured background on the slides. Please use a background without so much contrast within its texture. (Or no texture at all, my preference.) Slide 13: s/you app/your app/ s/scaffoling/scaffolding/ Slide 114: much of the text is in un

[web2py:18222] Re: The web2py wiki is now ready for your input!

2009-03-17 Thread Fred
I had worked on that wiki FAQ page. I think I used some hyperlink targets in the reST source (http://docutils.sourceforge.net/docs/ref/ rst/restructuredtext.html#hyperlink-targets) and I seem to recall that the reST parser used to be fragile concerning errors in those. But the key thing is that

[web2py:17501] Re: Critical point in web2py

2009-03-04 Thread Fred
I corrected a few pages in the wiki to fix some reST problems. But I see virtually no activity there. And I agree with the concerns about the wiki's limitations, both as expressed in this group and in the "TODO" page on the wiki. --~--~-~--~~~---~--~~ You receive