[web2py] user_signature question

2012-11-22 Thread rif
If you create a link with user_signature=True and a controller with @auth.requires_signature() and a user clicks on it while not yet logged in he/she will be presented with the login page and after that redirected to the original link but with Not authorized message. It is only after that user

[web2py]

2012-11-22 Thread Johann Spies
I cannot open http://www.web2pyslices.com. I have tried in Firefox, Opera and Chrome and get the following error: This webpage has a redirect loop Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

[web2py] web2pyslices: redirect problem

2012-11-22 Thread Johann Spies
On 22 November 2012 11:42, Johann Spies johann.sp...@gmail.com wrote: I cannot open http://www.web2pyslices.com. I have tried in Firefox, Opera and Chrome and get the following error: This webpage has a redirect loop Apologies for sending the first email with an empty subject line. Johann

[web2py] Re: SQLFORM.factory unexpectedly sets id datatype to str

2012-11-22 Thread Niphlod
Field('dogid', label='Name', requires=IS_IN_DB(db(db.dog), 'dog.id', '%(name)s')) this is a string field. It's requires to have a value in the db.dog.id set, but nonetheless, a string. Field('dogid', 'integer') This is an integer field. On Thursday, November 22, 2012 7:57:07

[web2py] Re: Orderby does not work field type 'double', sorts as if floats were strings

2012-11-22 Thread Niphlod
is this on SQLite ? On Thursday, November 22, 2012 3:44:38 AM UTC+1, Mark Li wrote: I currently have a table with 'scores' as one of the fields, with the field type 'double'. When I go to fetch a row (ordered by scores) and print the scores, they come back sorted as if they were strings.

Re: [web2py] Re: Gigya - Janrain alternative

2012-11-22 Thread Niphlod
now, that's what I can see shine embedded in web2py! On Thursday, November 22, 2012 12:06:01 AM UTC+1, villas wrote: This is opensource: https://velruse.readthedocs.org/en/latest/ On Wednesday, November 21, 2012 2:19:40 PM UTC, rochacbruno wrote: That looks really cool! I will try to

Re: [web2py] Re: No module named xxx Ubuntu

2012-11-22 Thread António Ramos
Now i have another python module requests that i cannot import in web2py2.X why? 2012/11/19 António Ramos ramstei...@gmail.com i moved my app to web2py2.XX and it works now! thank you António 2012/11/19 Mandar Vaze mandarv...@gmail.com if pycall is under applications/myapp/modules,

Re: [web2py] Re: No module named xxx Ubuntu

2012-11-22 Thread António Ramos
it works. I restarted web2py after installing requests module :) 2012/11/22 António Ramos ramstei...@gmail.com Now i have another python module requests that i cannot import in web2py2.X why? 2012/11/19 António Ramos ramstei...@gmail.com i moved my app to web2py2.XX and it works now!

Re: [web2py] How to use web2py confirmation form ?

2012-11-22 Thread Vinicius Assef
This feature is javascript and is included in web2py.js file (if I recall it right). See if your page is calling this js file. On Thu, Nov 22, 2012 at 3:09 AM, Amit amit.khaw...@gmail.com wrote: Hi, I have Delete button on SQLFORM.grid and upon clicking on it , it should popup confirmation

Re: [web2py] user_signature question

2012-11-22 Thread Vinicius Assef
BTW, what does @auth.requires_signature() really means? Wouldn't it be @auth.requires_login()? On Thu, Nov 22, 2012 at 6:19 AM, rif feric...@gmail.com wrote: If you create a link with user_signature=True and a controller with @auth.requires_signature() and a user clicks on it while not yet

Re: [web2py] Re: Gigya - Janrain alternative

2012-11-22 Thread villas
Yes, but take a look at the django stuff too. This article includes some interesting info. http://hackerluddite.wordpress.com/2011/05/17/review-of-4-django-social-auth-apps/ On Thursday, November 22, 2012 10:01:34 AM UTC, Niphlod wrote: now, that's what I can see shine embedded in web2py!

Re: [web2py] user_signature question

2012-11-22 Thread rif
In my words: validates that the user that saw the link is the user that executes the intended action. More here: http://web2py.com/books/default/chapter/29/04?search=requires_signature#Digitally-signed-urls joi, 22 noiembrie 2012, 14:13:19 UTC+2, viniciusban a scris: BTW, what does

[web2py] Re: Running GAE locally - beginners question

2012-11-22 Thread Andy W
Thanks howesc. I have figured it out. It seems to be a quirk with how you configure a new app in the GUI for GAE launcher. - in the 'New Application Settings', the 'Application Name' field should be left blank - just enter the web2py root directory in the 'Application Directory'

[web2py] Re: Redirect to https (V 2.0.6)

2012-11-22 Thread Nico Zanferrari
Hi, I have the same issue (error with a New simple application with similar messages), but I already have the NEWINSTALL file ;-(( web2py 2.2.1 (but also with 1.9.x), CentOS 6.3, Apache and WSGI. Do you have other ideas? Thank you, Nico --

Re: [web2py] Re: No module named xxx Ubuntu

2012-11-22 Thread Mandar Vaze / मंदार वझे
requests seems common name, possible conflict ? Depending on your web2py version, check to see if the following discussions are useful https://groups.google.com/forum/?fromgroups=#!searchin/web2py/import$20conflict/web2py/esjhf77d_jg/P0Dvc2nLur4J

Re: [web2py] Re: No module named xxx Ubuntu

2012-11-22 Thread Mandar Vaze / मंदार वझे
Ignore following - I didn't realize the problem was resolved - my bad. On Thu, Nov 22, 2012 at 6:37 PM, Mandar Vaze / मंदार वझे mandarv...@gmail.com wrote: requests seems common name, possible conflict ? Depending on your web2py version, check to see if the following discussions are useful

Re: [web2py] Re: Need to save a multipage PDF

2012-11-22 Thread Mandar Vaze
return response.stream(open(request.folder+'/static/temp.pdf', 'rb'),chunk_size=4096) # pdf.output(pfile, 'F') redirect(URL(index)) Will the execution ever reach redirect statement above ? I'm interested because I have a report page which generates the reports based on form

[web2py] Target in Menu links

2012-11-22 Thread Pradeeshnarayan
Is there any way to specify the target while creating menu. My requirement is, some menu I wanted to open in a new window. --

Re: [web2py] web2pyslices has a redirect loop

2012-11-22 Thread Manuele Pesenti
Il 22/11/12 10:42, Johann Spies ha scritto: I cannot open http://www.web2pyslices.com. I have tried in Firefox, Opera and Chrome and get the following error: This webpage has a redirect loop I confirm Cheers M. Regards Johann -- Because experiencing your loyal love is better than

Re: default vs not-default (was Re: [web2py] perhaps a silly question about index)

2012-11-22 Thread lyn2py
Can you clarify: why do you put your controllers in the models folder? On Wednesday, November 21, 2012 10:28:59 PM UTC+8, Brian Blais wrote: On Nov 21, 2012, at 4:55 AM, lyn2py wrote: You can remap this using routes.py On Tuesday, November 20, 2012 9:44:37 PM UTC+8, Brian Blais wrote:

[web2py] Subfolders in models

2012-11-22 Thread Joel Samuelsson
Hi, I would like to have a subfolder structure in my models folder. I am aware that subfolders are only executed upon request from the user. I saw this thread however: https://groups.google.com/forum/?fromgroups=#!searchin/web2py/models$20subfolders/web2py/o8Ya4ZqNhLk/eoeLK7_45Z4J But after

[web2py] python scripts/extract_mysql_models.py username:password@databasename db1.py problem

2012-11-22 Thread Jesse Rovolas
Well I ve been trying to connect to a little test db I got on my local Wamp Server but I can't seem to get it right . At first I tried to connect via mysql://username:password@127.0.0.1:3306/mydb URI and got it but the table of my db were unseen (only the auth table were there) then I def

[web2py] Re: Running GAE locally - beginners question

2012-11-22 Thread Julian Sanchez
I made that mistake as well :). In the Google App Engine Launcher make sure you use the File - ADD Existing Application and then browse to the web2py root folder. What you did is File - New Application which creates a hello world default page. It took me a while to figure that one out :P On

[web2py] Re: Target in Menu links

2012-11-22 Thread Alan Etkin
On Thursday, November 22, 2012 10:39:16 AM UTC-3, Pradeeshnarayan wrote:Is there any way to specify the target while creating menu. My requirement is, some menu I wanted to open in a new window. Could you explain a bit more what you want to accomplish? Do you want clicking in a menu item to

[web2py] Re: SQLFORM.grid join repeats parent's data in table.

2012-11-22 Thread Alan Etkin
On Thursday, November 22, 2012 9:07:23 AM UTC-3, Michael Hall wrote:I have the following code for my join in SQLFORM.grid: Perhaps you can pass something like this to .grid(): fields=[firsttable.field1, secondtable.field2, ...] to prevent repeating the columns in the form table --

[web2py] Re: python scripts/extract_mysql_models.py username:password@databasename db1.py problem

2012-11-22 Thread Alan Etkin
On Thursday, November 22, 2012 10:38:14 AM UTC-3, Jesse Rovolas wrote:Well I ve been trying to connect to a little test db I got on my local Wamp Server but I can't seem to get it right . With a new database all the db setup should be handled automagically by web2py DAL. If you are having

Re: [web2py] Re: Need to save a multipage PDF

2012-11-22 Thread Mandar Vaze
I did some debugging using firebug - Here is what is happening : When I choose HTML report there is a POST (posts form data - essentially filters selected by user) followed by GET (actual HTML page is returned from the template) But when I choose PDF report - I don't see any POST/GET in the

[web2py] Re: Redirect to https (V 2.0.6)

2012-11-22 Thread Nico Zanferrari
Got it! Following Massimo's advicehttps://groups.google.com/forum/#!msg/web2py/nsXx1KI49JA/Kg9GlxutOGQJI've resolved it with a simple: python web2py.py -a 'hello' I've already created a tickethttp://code.google.com/p/web2py/issues/detail?id=1179thanks=1179ts=1353595862in order to have it

[web2py] Re: Redirect to https (V 2.0.6)

2012-11-22 Thread Gerd
Hi! Thanks for finding this :) best regards, Gerd Am Donnerstag, 22. November 2012 15:58:10 UTC+1 schrieb Nico Zanferrari: Got it! Following Massimo's advicehttps://groups.google.com/forum/#!msg/web2py/nsXx1KI49JA/Kg9GlxutOGQJI've resolved it with a simple: python web2py.py -a

[web2py] Re: Target in Menu links

2012-11-22 Thread Jose
El jueves, 22 de noviembre de 2012 10:39:16 UTC-3, Pradeeshnarayan escribió: Is there any way to specify the target while creating menu. My requirement is, some menu I wanted to open in a new window. can use A: menu.append(['Test', False, A('Test', _href=URL('controller',

[web2py] hidden fields ignored in form=crud.update()?

2012-11-22 Thread Annet
In a function I have the following line of code: form=crud.update(table=db.aboutText,hidden=dict(nodeID=id,aboutID=HOMEABOUTID),record=row,next=session.crud_next,deletable=True) In the view the hidden fields are rendered correctly: input type=hidden value=11 name=nodeID input type=hidden

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
Yeah I log into the account every day so there's no problem there. I am trying to set the setting mail.settings.server = 'logging' but I do not know where it logs the messages...does anyone know where I'd find them? On Wednesday, November 21, 2012 7:32:26 PM UTC, Daniele wrote: I'm trying to

Re: default vs not-default (was Re: [web2py] perhaps a silly question about index)

2012-11-22 Thread Andrew W
Have you read the Overview chapter of the book? To achieve what you want you would not put controllers in the model folder, they go in the controllers folder. The default/index in the path refers to the file name and the function within the file name. So green/eggs/ham.refers to the green app,

[web2py] The book updates and status

2012-11-22 Thread Andrew W
The book has been at 4th edition for a while and I'm sure there have been updates since then. The edition numbers may tick over at major updates,but is it possible to put a last update date on it to tell when it has changed. One thing we talked about before version 2 was getting the doco up to

Re: [web2py] Re: Unable to send email in web2py

2012-11-22 Thread Jonathan Lundell
On 22 Nov 2012, at 8:02 AM, Daniele byakugan...@gmail.com wrote: Yeah I log into the account every day so there's no problem there. You might need to set mail.settings.tls = True. I am trying to set the setting mail.settings.server = 'logging' but I do not know where it logs the

[web2py] Re: Automatic login if username contains @ : Is this normal ?

2012-11-22 Thread demetrio
I have the same issue using web2py 1.99.7. I'm trying to connecto to an OpenDS LDAP, and if I use any non-existing user with @ enters automatically. Is this resolved in a newer release? If I can send some debug info just tell me. El jueves, 8 de noviembre de 2012 16:26:57 UTC+1, Massimo Di

[web2py] Re: I need a bit of Help with a function ! .. please ...

2012-11-22 Thread Paolo Caruccio
Please follow lyn2py's answer and you will be on the right track. def index(): if auth.is_logged_in(): redirect(URL('profile', 'member', args=auth.user_id)) @auth.requires_login() def member(): if int(request.args(0)) == auth.user_id: print 'profile of connected

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
Still doesn't work. I'm starting to wonder if this isn't a problem with the fact that I have a custom signup page? On Wednesday, November 21, 2012 7:32:26 PM UTC, Daniele wrote: I'm trying to send emails upon user registration. This is what I have in my models file: mail =

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread peter
Unless you really need to use you gmail account, I would set up a new gmail account. I just did this and used port 587. It initially did not work, but after I verified via phone it worked. Peter On Thursday, 22 November 2012 18:10:47 UTC, Daniele wrote: Still doesn't work. I'm starting to

[web2py] Re: How to response.flash when Profile is saved, and not when viewed.

2012-11-22 Thread Rob_McC
. I think I figured it out, . Once again, it boils down just to a few lines of code :) - Here is the solution: I'm still testing it, but so far so good. Note: For the longest time, I had two r in request.env.http_referer which DID NOT WORK. Ref:

[web2py] datetime delta with Sqlite - how to?

2012-11-22 Thread dederocks
Hi, If you have two datetime fields dta and dtb, a db().select(dta-dtb) will return zero using the sqlite db, but a correct value if you use postgresql for example. The trick to make it work is to replace dta by julianday(dta) in the select, e.g. db().select(julianday(dta)-julianday(dtb)). I

[web2py] Re: Orderby does not work field type 'double', sorts as if floats were strings

2012-11-22 Thread Mark Li
Yes this is on SQLite, is this a problem unique to SQLite? On Thursday, November 22, 2012 1:58:41 AM UTC-8, Niphlod wrote: is this on SQLite ? On Thursday, November 22, 2012 3:44:38 AM UTC+1, Mark Li wrote: I currently have a table with 'scores' as one of the fields, with the field type

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
I am trying with my mail account from Bluehost. I'm following their instructions and still can't get it to work. I've tried so many different combinations I believe I've exhausted all possible solutions. I'm starting to think this is a bug with web2py... On Wednesday, November 21, 2012 7:32:26

[web2py] Password Change, not checking if old password is valid.

2012-11-22 Thread Rob_McC
Hey: Been doing a lot of testing lately... It appears that Password Change should be checking OLD password, Here are the details of my tests: *Using*: web2py Version 2.2.1 (2012-10-21 16:57:04) stable Steps: 1- Create a NEW app, PasswordChange 2- Register a new user User:

[web2py] Re: Orderby does not work field type 'double', sorts as if floats were strings

2012-11-22 Thread Niphlod
yep, support for decimal is kinda absent so it's treated like a string. On Thursday, November 22, 2012 10:10:23 PM UTC+1, Mark Li wrote: Yes this is on SQLite, is this a problem unique to SQLite? On Thursday, November 22, 2012 1:58:41 AM UTC-8, Niphlod wrote: is this on SQLite ? On

[web2py] Re: datetime delta with Sqlite - how to?

2012-11-22 Thread Niphlod
Mind that the functionality is database dependant, hence you won't get the same results changing the db engine. Moreover you get different rounding errors trying to subtract similar dates. Recent web2py's DAL supports an epoch() method that returns seconds passed since 1-1-1970. If you can

Re: [web2py] page min height

2012-11-22 Thread Jonas Fredriksson
Hi. I tried the link and more or less copied the code but the sticky footer don't work. especially the push seems not to work. here is my code: div id=wrap div class=container div class=page-header h1page header/h1 /div div class=row div class=span4h3span4/h3/div

Re: [web2py] page min height

2012-11-22 Thread Niphlod
did you include the css rules needed ? html, body {height: 100%;/* The html and body elements cannot have any padding or margin. */ } /* Wrapper for page content to push down footer */ #wrap {min-height: 100%;height: auto !important;

Re: [web2py] page min height

2012-11-22 Thread jonas
I am using web2py with boostrap so it is possible that the css is different. I will try the code below overriding bootstrap and web2py css in this case On Friday, November 23, 2012 12:08:48 AM UTC+1, Niphlod wrote: did you include the css rules needed ? html, body {height:

Re: [web2py] page min height

2012-11-22 Thread jonas
ok. it works when adding those rules. thanks On Friday, November 23, 2012 12:08:48 AM UTC+1, Niphlod wrote: did you include the css rules needed ? html, body {height: 100%;/* The html and body elements cannot have any padding or margin. */ } /* Wrapper for

[web2py] Re: Automatic login if username contains @ : Is this normal ?

2012-11-22 Thread Massimo Di Pierro
I believe this is a bug in Python-ldap not a bug in web2py. This is a serious bug. 1) We have two options: block all usernames containing a @ (but what if the username is legitimate?) 2) Fix it in ldap. In case 2) it would help if somebody could reproduce the problem in a simple python ldap

[web2py] Re: SQLFORM.factory unexpectedly sets id datatype to str

2012-11-22 Thread Mark Kirkwood
Thanks, Niphlod - However amending the form definition as you suggested, i.e: form=SQLFORM.factory( Field('dogid', 'integer', requires=IS_IN_DB(db(db.dog), 'dog.id', '%(name)s')), ) gives the same behaviour - i.e field is still a str. --

[web2py] Re: Orderby does not work field type 'double', sorts as if floats were strings

2012-11-22 Thread Mark Li
Ahh thanks Niphlod! On Thursday, November 22, 2012 2:49:28 PM UTC-8, Niphlod wrote: yep, support for decimal is kinda absent so it's treated like a string. On Thursday, November 22, 2012 10:10:23 PM UTC+1, Mark Li wrote: Yes this is on SQLite, is this a problem unique to SQLite? On

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
Ok I got basic emailing to work. Here's what the problem was: When I made my project, I used the wizard. The wizard created a file called 0.py (GREAT NAME) that was overriding my mail.settings.* variables. So no matter how I set them, they'd get overwritten with things like ' ' Anyways, the

[web2py] Re: The book updates and status

2012-11-22 Thread villas
Hi Andrew You can see the current state and updates here: https://github.com/mdipierro/web2py-book On Thursday, November 22, 2012 4:32:39 PM UTC, Andrew W wrote: The book has been at 4th edition for a while and I'm sure there have been updates since then. The edition numbers may tick over

[web2py] Re: The book updates and status

2012-11-22 Thread Andrew W
Thanks. On Friday, November 23, 2012 2:39:41 PM UTC+13, villas wrote: Hi Andrew You can see the current state and updates here: https://github.com/mdipierro/web2py-book On Thursday, November 22, 2012 4:32:39 PM UTC, Andrew W wrote: The book has been at 4th edition for a while and I'm

[web2py] Re: videos not working in auth.wiki page

2012-11-22 Thread Andrew W
Could you please confirm that it's working OK ? thanks On Saturday, November 17, 2012 10:37:14 AM UTC+13, Andrew W wrote: Thanks. That's what I did. On Friday, November 16, 2012 11:56:49 PM UTC+13, Massimo Di Pierro wrote: No. You do not need it. You just cut and paste the link to the

[web2py] How to reset the form after PDF is returned using appreport plugin

2012-11-22 Thread Mandar Vaze
(Changed the subject - I realized hijacking old thread isn't helping me get responses) More debugging : I tried the code from Docs and Example page, appreport's Wiki ( https://github.com/lucasdavila/web2py-appreport/wiki/Docs-and-examples) Specifically example starting w/ or, rendering a web2py

[web2py] Re: good read on security

2012-11-22 Thread piero crisci
In Europe the privacy law is a bit different than in America and it would be interesting for me have some reference to your law's article. I use to be the privacy reference in my administration and i can understand what the article means. If you are interested in Italian's privacy law i can post