[web2py] Auth related emails, via web2py scheduler

2014-03-27 Thread Kiran Subbaraman
Hello, I took a look at this chapter: http://web2py.com/books/default/chapter/29/08/emails-and-sms#Sending-messages-using-a-background-task, and got this to work - Am able to send emails via a background task. I was wondering how I could make the Auth related emails also to be sent via this bac

[web2py] Re: Hi, Is there a way to block ip address if there are more no of requests from the same ip address

2014-03-27 Thread 黄祥
perhaps, if you record the user access from in your database, i think you can query it, and redirect so that user not access your web application if the condition is met (access from same ip address). this is just a redirect so that user can't access your web application not block their ip addr

Re: [web2py] web2py and python3

2014-03-27 Thread Massimo Di Pierro
and it never will - by definition. we''l build something that works with python3 eventually. On Thursday, 27 March 2014 11:06:08 UTC-5, viniciusban wrote: > > Web2py doesn't work with Python 3 yet. > > On Thu, Mar 27, 2014 at 8:01 AM, Maurice Waka > wrote: > > > > Does web2py function with

[web2py] Re: Keep menu floating on top

2014-03-27 Thread Massimo Di Pierro
, and in css .menu { position: fixed; top:0} On Thursday, 27 March 2014 10:50:29 UTC-5, Tom Clerckx wrote: > > Is there an easy way to keep the menu 'floating' on top. > I.e. when a user scrolls down that the menu stays visible at the top of > the page > > Best regards, > Tom. > -- Reso

[web2py] Re: Hi, Is there a way to block ip address if there are more no of requests from the same ip address

2014-03-27 Thread Massimo Di Pierro
Usually this is handled at the level if the web server, not the web framework. On Thursday, 27 March 2014 08:31:22 UTC-5, Kv Harish wrote: > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

[web2py] Re: Bad Request upload image in iPad/iOS to web2py server

2014-03-27 Thread Massimo Di Pierro
Is this a normal multipart post request? If not, perhaps you should use request.body.read() and log what is in there. On Thursday, 27 March 2014 07:48:39 UTC-5, ayresrichard wrote: > > > I am developing a web browser application where the user must upload a > image file to a web2py server. > >

[web2py] Re: New Windows Vista Install problem

2014-03-27 Thread User
Did you install web2py source version or web2py_win.zip? What python version are you using? And when you "run" it, what are you doing specifically? On Wednesday, March 26, 2014 4:51:30 PM UTC-4, ian james wrote: > I have installed Win2py on my Vista laptop. (My laptop video hardware is > n

Re: [web2py] web2py and python3

2014-03-27 Thread Marco Mansilla
El Thu, 27 Mar 2014 04:01:56 -0700 (PDT) Maurice Waka escribió: > > Does web2py function with python 3.3 or python 3.4? I have installed > web2py but it cannot run with the python3.4 that I use. I get an > error after trying to run the 'web2py.exe - S welcome' that says, > syntax error > You'l

[web2py] gluon.shell does not import models

2014-03-27 Thread pang
After reinstalling ths operating system, I try import gluon.shell gluon.shell.run('karakolas',import_models=True) and gluon.shell.run('karakolas/pedir') but in both cases, the name db is not in locals. It may be the python version. I use python2, but gluon.shell may be calling "python", which

[web2py] Re: Cannot unzip the downloaded files from http://www.web2py.com/init/default/download

2014-03-27 Thread Dave S
On Thursday, March 27, 2014 4:00:43 AM UTC-7, Antonis Loumiotis wrote: > > Hi, > > I'm trying to unzip (using 7-zip) the source code obtained from > http://www.web2py.com/init/default/download but I get the following error: > > Can not open file 'C:\Documents and Settings\...\web2py_src.zip' as

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Avi A
thanks. On Thursday, March 27, 2014 6:28:31 PM UTC+2, Niphlod wrote: > > NULLs are NULL. They are nothing. Like in a suspended state. Dust in the > wind. Completely untraceable unless IS NULL or IS NOT NULL are specified as > WHERE clauses. > > Not True means False. > Not False means True. > >

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Niphlod
NULLs are NULL. They are nothing. Like in a suspended state. Dust in the wind. Completely untraceable unless IS NULL or IS NOT NULL are specified as WHERE clauses. Not True means False. Not False means True. If you need to fetch False OR NULL records db( (db.t_tests.f_test_is_a_clone

Re: [web2py] URL of an external website

2014-03-27 Thread Jonathan Lundell
On 27 Mar 2014, at 6:49 AM, Louis Amon wrote: > I'm trying to use the URL() function to connect to an external website's API, > thus benefitting from web2py's HTML entity encoding feature. > > I wrote something like this : > > URL(scheme='http', domain='www.example.org', a='API', vars={'localit

[web2py] Re: displaying count and groupby

2014-03-27 Thread Niphlod
. return dict(rows=rows, count=count, groupby=groupby) On Thursday, March 27, 2014 9:21:01 AM UTC+1, Dave S wrote: > > > I know I'm a bit slow, but ... > > On Wednesday, March 26, 2014 4:21:27 PM UTC-7, Dave S wrote: >> >> On Wednesday, March 26, 2014 12:58:36 PM UTC-7, Niphlod wrote: >>>

[web2py] Re: Beginner question: foreign key constraint failed (?)

2014-03-27 Thread Niphlod
did you try with a fresh database ? On Thursday, March 27, 2014 3:18:07 PM UTC+1, Krzysztof Socha wrote: > > I created a simple table that uses another table as a list of possible > values for a field: > > db.define_table('country', > Field('name','string',length=DEFAULT_STRING_LENGTH)) > > db.de

Re: [web2py] web2py and python3

2014-03-27 Thread Vinicius Assef
Web2py doesn't work with Python 3 yet. On Thu, Mar 27, 2014 at 8:01 AM, Maurice Waka wrote: > > Does web2py function with python 3.3 or python 3.4? I have installed web2py > but it cannot run with the python3.4 that I use. I get an error after trying > to run the 'web2py.exe - S welcome' that say

[web2py] Bad Request upload image in iPad/iOS to web2py server

2014-03-27 Thread ayresrichard
I am developing a web browser application where the user must upload a image file to a web2py server. I am using the traditional way for file input, which, in the iPad, gives the option to either upload an existing picture or take a new one from the camera. var url = "http://please-help-me.co

[web2py] Keep menu floating on top

2014-03-27 Thread Tom Clerckx
Is there an easy way to keep the menu 'floating' on top. I.e. when a user scrolls down that the menu stays visible at the top of the page Best regards, Tom. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] URL of an external website

2014-03-27 Thread Louis Amon
Hi, I'm trying to use the URL() function to connect to an external website's API, thus benefitting from web2py's HTML entity encoding feature. I wrote something like this : URL(scheme='http', domain='www.example.org', a='API', > vars={'locality':'some, city'}) and found that the encoded URL

[web2py] New Windows Vista Install problem

2014-03-27 Thread ian james
I have installed Win2py on my Vista laptop. (My laptop video hardware is not supported on windows 7) When I run Win2py, the CMD window flashes on my screen and then disappears. I have had this problem with a previous Python install years ago. However, the PY application opens a CMD window an

[web2py] web2py and python3

2014-03-27 Thread Maurice Waka
Does web2py function with python 3.3 or python 3.4? I have installed web2py but it cannot run with the python3.4 that I use. I get an error after trying to run the 'web2py.exe - S welcome' that says, syntax error -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Cannot unzip the downloaded files from http://www.web2py.com/init/default/download

2014-03-27 Thread Antonis Loumiotis
Hi, I'm trying to unzip (using 7-zip) the source code obtained from http://www.web2py.com/init/default/download but I get the following error: Can not open file 'C:\Documents and Settings\...\web2py_src.zip' as archive. Actually I face the same problem with any of the files in http://www.web2p

[web2py] Beginner question: foreign key constraint failed (?)

2014-03-27 Thread Krzysztof Socha
I created a simple table that uses another table as a list of possible values for a field: db.define_table('country', Field('name','string',length=DEFAULT_STRING_LENGTH)) db.define_table('company', Field('name', 'string', requires=IS_NOT_EMPTY(error_message=auth.messages.is_empty)), Field('addre

[web2py] Hi, Is there a way to block ip address if there are more no of requests from the same ip address

2014-03-27 Thread Kv Harish
-- 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 Google Groups "web2py-users" group. To unsub

[web2py] Re: uploadfolder default value (MongoDB/web2py version 2.9.4)

2014-03-27 Thread Massimo Di Pierro
This looks like a bug. Please open a ticket on google code. On Thursday, 27 March 2014 06:12:00 UTC-5, Mandar Vaze wrote: > > Massimo, > > Further debugging I learnt that the derived Adapter classes like > MySQLAdapter (and several others) call a method call "find_or_make_folder" > > MongoDBAdapt

Re: [web2py] Re: displaying count and groupby

2014-03-27 Thread Johann Spies
On 27 March 2014 10:21, Dave S wrote > > > > Except for one tiny detail. I don't want to print the results from the > controller, I want the view to display them. > > What about rows = SQLTABLE( db(db.table.id >0).select(count, groupby, groupby=groupby) > Johann -- Because experiencing your l

Re: [web2py] Re: janrain and web2py

2014-03-27 Thread Martin Weissenboeck
I agree. I have I website with about 6000 users, but they have to login only once per month. The idea is very good, but Janrain is too expensive for me. 2014-03-27 10:22 GMT+01:00 Dragan Matic : > It still works with Google in version 2.8.x. > > But as someone mentioned, their prices are pretty

Re: [web2py] janrain and web2py

2014-03-27 Thread Adnan Smajlovic
I posted couple weeks ago that it stopped working, but then deleted a post thinking it's my fault as usual :) They replaced Google with Google+. Had to fiddle around, and switched to paid version, so got it to work again. Sample: http://recruit55.com/bmbusiness On Tue, Mar 25, 2014 at 1:30 PM,

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Avi A
i checked all items as clones, then unchecked those i wanted,, and it's all fine now. thanks. On Thursday, March 27, 2014 1:20:28 PM UTC+2, Mandar Vaze wrote: > > Which DB are you using ? The generated SQL seems correct (For MySQL - > is_active is set to 'T' for True and 'F' for False) > > Can

[web2py] Re: Remove query db field

2014-03-27 Thread Mandar Vaze
select() query returns list of "Rows" Each "Row" looks like a python dict As far as I know the "keys" are database field names. If you want to "print" the rows as is - you may need to write your custom code to "covert" them to user-friendly titles. DAL is meant to interact with databases smartgr

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Mandar Vaze
Which DB are you using ? The generated SQL seems correct (For MySQL - is_active is set to 'T' for True and 'F' for False) Can you run the (modified, if needed) raw SQL query on the DB ? Just examine various values under the f_test_is_a_clone column. That will give you idea as to what should be

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Anthony
In Python, NULL db values are represented as None. -- 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

[web2py] Re: uploadfolder default value (MongoDB/web2py version 2.9.4)

2014-03-27 Thread Mandar Vaze
Massimo, Further debugging I learnt that the derived Adapter classes like MySQLAdapter (and several others) call a method call "find_or_make_folder" MongoDBAdapter does *not* call find_or_make_folder() - hence the self.folder remains None till the point it needs to be used. *Is there a specifi

Re: [web2py] Re: janrain and web2py

2014-03-27 Thread Dragan Matic
It still works with Google in version 2.8.x. But as someone mentioned, their prices are pretty high, it would be nice to have an alternative. On Wednesday, March 26, 2014 9:03:13 PM UTC+1, Niphlod wrote: > > it's been sitting on issues and roadmap for quite a while > > On Tuesday, Marc

[web2py] Re: displaying count and groupby

2014-03-27 Thread Dave S
I know I'm a bit slow, but ... On Wednesday, March 26, 2014 4:21:27 PM UTC-7, Dave S wrote: > > On Wednesday, March 26, 2014 12:58:36 PM UTC-7, Niphlod wrote: >> >> assuming. >> >> count = db.table.id.count() >> groupby = db.table.birthday.month() >> >> #you can do >> >> rows = db(db.table.id

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Annet
I had a similar problem with a query containing a field of type boolean. I solved it by adding default = False to the field definition. Tim already mentioned this in his post. I don't know what database you are using, but in Postgresql 'F' is not a valid literal for the false state. In my web2py