[web2py] $_SERVER['PHP_AUTH_USER']

2015-07-24 Thread Laurent Lc
Hi, i'd like to retrieve the login of people when they authentificate through a cas server. With PHP no problem with $_SERVER['PHP_AUTH_USER'] How do we do with web2py thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source c

[web2py] Displaying 0 instead of None in my app

2015-07-24 Thread Joe
I want to display *0* instead of *None* for the session.counter or session.wrong_counter in my app. I have tried about 10 different ways to do this but I am not getting it right for some reason. This is the Controller for the page *score*: def score(): image = db.pic(request.args(0,

[web2py] Displaying 0 instead of None in my app

2015-07-24 Thread Alex
that's because the other session variable is not initialized. try this for example: if correct: session.counter = (session.counter or 0)+1 session.wrong_counter = session.wrong_counter or 0 right_counter=session.counter else: session.wrong_counter = (session.wrong_counter or 0)+1

[web2py] Displaying 0 instead of None in my app

2015-07-24 Thread Anthony
Well, the code checks two conditions, correct and not correct, and only one of those is true on any given request. Yet you only set the value of one of your session variables within each condition -- so of course the one you don't set is None (it is actually undefined, but the session object is

[web2py] disabling only email acount for vacations

2015-07-24 Thread Carlos Cesar Caballero Díaz
Hi, I created this account without using my google ID, mainly because This is the mail account that I continuously check, now I need to temporarily disable it, but I dont find how to do it... -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respa

[web2py] Re: disabling only email acount for vacations

2015-07-24 Thread Carlos Cesar Caballero
Well, problem solved, I just add the mail account as an alternative email, and now all the groups associated to the address are in my account (and I can disable temporaly the emails in the groups options). So, thanks and I am back almost 20 days. El viernes, 24 de julio de 2015, 9:18:08 (UTC-4)

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-07-24 Thread Niphlod
iis on windows, nginx on linux. On Thursday, July 23, 2015 at 10:00:27 PM UTC+2, Alex Glaros wrote: > > Niphlod, can you please list some alternatives to Apache? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:/

[web2py] session pickle error

2015-07-24 Thread ermolaev . icreator
session.connect(request,response,cookie_key='...',compression_level=None) then addr = request.args(0) or request.vars.addr session.seeAddr = '%s' % addr someone raise error FrameworkTypeError: getattr(): attribute name must be string + deta

[web2py] How to display a SQL Record with Customized Formatting

2015-07-24 Thread Rahul Nahata
I am trying to create an online directory which requires me to display a persons details from a modified auth_user table in a seperate page ( with id as an argument to the page). I am facing problems while formatting the display of the sql record with help of BEAUTIFY function applied to the r

[web2py] Re: Invalid password reset

2015-07-24 Thread wish7code
OK, I see. It might really be a Google bug: I just saw my messages disappearing with the message > Message from the moderator: > Your message has been rejected. > Only posts related to web2py are allowed. But back to the details: Basically I've got pretty much the same setting as Annet, i.e. usi

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-07-24 Thread ermolaev . icreator
if session in cookies FrameworkTypeError: getattr(): attribute name must be string + details 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

[web2py] Make custom SQLFORM grid LINKS buttons give feedback like regular web2py form buttons?

2015-07-24 Thread Gary Cowell
I have a SQLFORM grid with some buttons in the LINKS : They are generated thus: def makeButton( ... ) ... if result == 0: status = 'Up' buttonTitle='Stop' buttonURL

[web2py] sqlite3 locking

2015-07-24 Thread jackson . read
The docs say that web2py locks a sqlite3 database file always...even if just reading. Is there a way to circumvent this so that my database writing process does have to wait for web2py reading the database? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gith

Re: [web2py] Google Groups is broken for web2py

2015-07-24 Thread Massimo Di Pierro
Yes there was a google bug. It appear to have been resolved. One user has also reported messages disappearing with the message > Message from the moderator: > Your message has been rejected. > Only posts related to web2py are allowed. hopefully this was a one time glitch. Massimo On Thurs

[web2py] $_SERVER['PHP_AUTH_USER']

2015-07-24 Thread Dave S
Doesn't w2p's auth.user cover that? http://web2py.com/books/default/chapter/29/09/access-control#Authentication> (actually, go to http://web2py.com/books/default/chapter/29/09/access-control#Restrictions-on-registration> and scroll up to the last example in the parent section) /dps -- Resources

[web2py] Re: Tutorial bootstrap+web2py

2015-07-24 Thread Massimo Di Pierro
I had answered this and my poste disappeared. :-( web2py.css is legacy code and unused in the new welcome app. You would use it in apps that do not have bootstrap. bootstrap.min.css is what it says web2py-bootstrap3.css includes classes to make the grid and the forms work well with bootstrap b

[web2py] Re: We do not delete posts

2015-07-24 Thread Dave S
If you can see the list that's pending approval, then you're probably a moderator. /dps -- 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 thi

[web2py] Re: Is this the right way to encode downloaded files with base64?

2015-07-24 Thread Massimo Di Pierro
before we answer that question. What are you trying to do? On Wednesday, 22 July 2015 01:34:05 UTC-5, Phillip wrote: > > In the controller in a json service function, I download a stored file of > type 'upload' as follows: > > filecontents = URL('download', args=db.s_files[1].s_file) > > encode

[web2py] Re: Verify password in register

2015-07-24 Thread Massimo Di Pierro
There is not but this is a bug. The verify password field should always appear after the password field. We will fix this asap. On Thursday, 23 July 2015 04:23:58 UTC-5, Luis Valladares wrote: > > Hello, I've modified the auth_user table using Auth.settings.extra_fields > and added 3 fields, the

[web2py] Re: scaling app with web services

2015-07-24 Thread Massimo Di Pierro
Definitively remove everything you do not need in models. Try use caching as much as you can, perhaps redis cache. On Thursday, 23 July 2015 05:08:04 UTC-5, Khalil Khamlichi wrote: > > Hi, > > We are in the process of scaling a web2py application (app1), basically we > are moving old data to a

[web2py] Re: :using plugin_ckeditor as default editor for built-in wiki

2015-07-24 Thread Massimo Di Pierro
yes. first of all you can call the auth.wiki() function you should pass render='html' to use HTML instead of markmin syntax. Then just install ckeditor (or any other wysiwyg html editor) and use jQuery to apply to the relevant tags. On Thursday, 23 July 2015 09:47:25 UTC-5, Karl-Thomas Sc

[web2py] Re: session pickle error

2015-07-24 Thread Massimo Di Pierro
which web2py version? On Friday, 24 July 2015 15:52:25 UTC-5, ermolaev.icrea...@gmail.com wrote: > > > session.connect(request,response,cookie_key='...',compression_level=None) > > then > addr = request.args(0) or request.vars.addr > session.seeAddr = '%s' % addr > > someone raise err

[web2py] Re: sqlite3 locking

2015-07-24 Thread Massimo Di Pierro
Where do we say that? We do not lock it for reading. But if it is locked for writing it cannot be opened for reading, this is default sqlite behavior. Web2py does not do anything special to change it. On Friday, 24 July 2015 15:52:26 UTC-5, jackson.r...@quantachrome.com wrote: > > The docs say t

[web2py] Not able to handle serveral requests in parallel

2015-07-24 Thread sonu kumar
Hi All, I am facing issues with handling several request in parallel from same user. When I submit one job and then simultaneously try to open my server homepage in new tab, it waits until first one finishes. I went through some earlier answers regarding this and came to know that there is some

[web2py] Re: How to display a SQL Record with Customized Formatting

2015-07-24 Thread Dave S
On Friday, July 24, 2015 at 1:52:25 PM UTC-7, Rahul Nahata wrote: > > I am trying to create an online directory which requires me to display a > persons details from a modified auth_user table in a seperate page ( with > id as an argument to the page). > > I am facing problems while formatting

[web2py] Re: How to display a SQL Record with Customized Formatting

2015-07-24 Thread Anthony
BEAUTIFY is not meant for this purpose. Instead, you can try a readonly form (which is what the grid uses to view the details of each record): {{=SQLFORM(db.auth_user, record=record, readonly=True)}} You can control the display via the "represent" attribute of each field as well as the "formsty

[web2py] Re: Not able to handle serveral requests in parallel

2015-07-24 Thread Anthony
If you have sessions in files, the session file is locked upon each request, so each new request must wait for the previous one to complete. This generally is much of a problem unless you have some very long running requests, as in your case. The best practice with long running operations is no

[web2py] Re: $_SERVER['PHP_AUTH_USER']

2015-07-24 Thread Anthony
Once a user has logged in, whatever details are recorded in the db.auth_user record are available in auth.user. Have you tried that and not found what you are looking for? Anthony On Friday, July 24, 2015 at 5:04:42 AM UTC-4, Laurent Lc wrote: > > Hi, > i'd like to retrieve the login of people

[web2py] Re: Make custom SQLFORM grid LINKS buttons give feedback like regular web2py form buttons?

2015-07-24 Thread Anthony
I think that is set up to work only with links that fire Ajax requests or submit buttons in forms. On Friday, July 24, 2015 at 4:52:24 PM UTC-4, Gary Cowell wrote: > > I have a SQLFORM grid with some buttons in the LINKS : > > >