Re: [web2py] use of 'timedelta' as a field

2010-12-21 Thread ron_m
timediff is just 3 integers representing days, seconds, microseconds so you could decompose it and store it as 3 int fields in the DB and then use the 3 int values in a constructor to get it back. Alternative would be to convert it to a float or double if you can accept rounding errors.

[web2py] Re: The stability of web2py releases

2010-12-21 Thread ron_m
If you are sensitive to new releases to production then take a slower approach. 1.90.1 to 1.90.6 happened in just over a day with very big changes coming into 1.90.1 to make the future development in certain directions possible. I think there were more problems found in trunk testing before rel

Re: [web2py] use of 'timedelta' as a field

2010-12-21 Thread Sahil Arora
like SQLField('actual_time','timedelta') which is certainly not correct as it is giving error. Is there any other alternative so that i can do addition with actual_time . On Wed, Dec 22, 2010 at 11:16 AM, Sahil Arora wrote: > Can I define a table with a field of type 'timedelta' in database. > I

[web2py] Re: The stability of web2py releases

2010-12-21 Thread cjrh
On Dec 22, 4:43 am, Luther Goh Lu Feng wrote: > I have started using web2py a few months ago and I have noticed that > some of the releases might actually be far from stable. - Actively developed - Feature-rich - Stable Pick any two ;)

[web2py] use of 'timedelta' as a field

2010-12-21 Thread Sahil Arora
Can I define a table with a field of type 'timedelta' in database. I have to do some calculations of time using timedelta.

[web2py] Re: app wizard mail not defined at the end, 1.91.1

2010-12-21 Thread mdipierro
This cannot be. The wizard does not write that line. It comes from the scaffolding app welcome and it is not commented there. On Dec 21, 11:18 pm, szimszon wrote: > Hi! > > I made a new app with the wizard but at the end the mail variable > isn't defined... > > (name 'mail' is not defined) > > Th

[web2py] app wizard mail not defined at the end, 1.91.1

2010-12-21 Thread szimszon
Hi! I made a new app with the wizard but at the end the mail variable isn't defined... (name 'mail' is not defined) The mail = Mail() is just commented out in db.py...

[web2py] try web2py with cherrypy, diesel, eventlet, fapws,flup, gnuicorn, paste, rocket, tornado, twisted, wsgiref

2010-12-21 Thread mdipierro
we made this easy. There is a new file in trunk web2py/anyserver.py so just do easy_install cherrypy python anyserver.py -s cherrypy -p 8080 easy_install tornado python anyserver.py -s tornado -p 8081 ... you get the idea. -h for help -i and -p to specify ip and port, -l for logging and -P for

[web2py] Re: Can't start web2py with SSL

2010-12-21 Thread mdipierro
you need easy_install ssl web2py does not use python-openssl On Dec 21, 9:39 pm, Martin H wrote: > Hi, > > I am on Debian Lenny and trying to start web2py/rocket with SSL. I've > created an SSL key and cert. When I try to start it, I get this: > > ERROR:Rocket.Errors.Port8443:ssl module require

[web2py] Re: The stability of web2py releases

2010-12-21 Thread mdipierro
I think you should check how long the release has been around. 1.90.* was one of the worst ever because it included of the DAL which accounts for 18% of the entire web2py code. This 18% is used everywhere. All in all very few things broke. Massimo On Dec 21, 8:43 pm, Luther Goh Lu Feng wrote: >

[web2py] Can't start web2py with SSL

2010-12-21 Thread Martin H
Hi, I am on Debian Lenny and trying to start web2py/rocket with SSL. I've created an SSL key and cert. When I try to start it, I get this: ERROR:Rocket.Errors.Port8443:ssl module required to serve HTTPS. I installed the debian package python-openssl and that hasn't changed anything. Can someon

Re: [web2py] web2py 1.91.1 is OUT (LGPLv3)

2010-12-21 Thread appydev
Thank you very much! 2010/12/21 mdipierro > web2py 1.91.1 is out, the first version with a new license. > > Main changes are the license, bug fixes (compared to 1.90.*) and a new > shell that runs better than before and runs on GAE too, if you choose > to deploy it. > > Massimo > >

[web2py] The stability of web2py releases

2010-12-21 Thread Luther Goh Lu Feng
I have started using web2py a few months ago and I have noticed that some of the releases might actually be far from stable. Take for instance, the 1.90 release. There were unfortunately quite a few uncaught bugs and this was followed by a flurry of bug fix releases. I understand that this is becau

[web2py] Re: Recent Posts in plugin_wiki

2010-12-21 Thread nic
On Dec 22, 3:12 am, mdipierro wrote: > If you put {{include 'recentPosts.html'}} in layout.html than the view > 'recentPosts.html' is included in the layout but the corresponding > action is not called. > > Try replace > > {{include 'recentPosts.html'}} > > with > > {{=LOAD('default','recentPost

Re: [web2py] It is done GPL2 -> LGPL3

2010-12-21 Thread Luis Díaz
+1 2010/12/22 R. Strusberg > Another reason to switch from *webframework to web2py!. > > +1 :-) Merry Christmas +1 > > 2010/12/21 mdipierro : > > For now trunk only. This will propagate to stable since 1.91.1 > > > -- Díaz Luis TSU Analisis de Sistemas Universidad de Carabobo http://web2pyf

[web2py] Re: web2py 1.91.1 is OUT (LGPLv3)

2010-12-21 Thread mdipierro
On Dec 21, 8:07 pm, Anthony wrote: > Excellent. > > On the download page (http://www.web2py.com/examples/default/download), > there's a typo: > > "(under the terms of the LPGL" should be "(under the terms of the LGPL)" > (i.e., "PG" -> "GP", and include closing parenthesis). oops > > Also, stil

[web2py] Re: web2py 1.91.1 is OUT (LGPLv3)

2010-12-21 Thread Anthony
Excellent. On the download page (http://www.web2py.com/examples/default/download), there's a typo: "(under the terms of the LPGL" should be "(under the terms of the LGPL)" (i.e., "PG" -> "GP", and include closing parenthesis). Also, still need to update the license in the book: http://www.

[web2py] Re: web2py 1.91.1 is OUT (LGPLv3)

2010-12-21 Thread Luther Goh Lu Feng
You are working too fast Massimo :p On Dec 22, 9:33 am, mdipierro wrote: > web2py 1.91.1 is out, the first version with a new license. > > Main changes are the license, bug fixes (compared to 1.90.*) and a new > shell that runs better than before and runs on GAE too, if you choose > to deploy it.

[web2py] web2py 1.91.1 is OUT (LGPLv3)

2010-12-21 Thread mdipierro
web2py 1.91.1 is out, the first version with a new license. Main changes are the license, bug fixes (compared to 1.90.*) and a new shell that runs better than before and runs on GAE too, if you choose to deploy it. Massimo

[web2py] Re: database query

2010-12-21 Thread mdipierro
If you have joins, I would do this: movies_with_activeTag=db(db.movies.id.belongs(db(db.link.tagID==id_of_activeTag)._select(db.link.movieID,groupby=db.link.movieID,orderby=db.link.movieID))).select() On Dec 21, 7:00 pm, czamb wrote: > This should be an easy one, but I can't figure it out. I am

[web2py] database query

2010-12-21 Thread czamb
This should be an easy one, but I can't figure it out. I am using the tagging implementation from plugin_wiki: Two tables (tag and link) store the info about tags on records in a third table (e.g. "movies"). db.tag has Fields id and name=str db.link has fields id, tagID=int and movieID=int Now if

Re: [web2py] It is done GPL2 -> LGPL3

2010-12-21 Thread R. Strusberg
Another reason to switch from *webframework to web2py!. +1 :-) Merry Christmas +1 2010/12/21 mdipierro : > For now trunk only. This will propagate to stable since 1.91.1 >

Re: [web2py] It is done GPL2 -> LGPL3

2010-12-21 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 1:30 AM, Bruno Rocha wrote: > LGPL3 + 1 > Merry Christmas + 1 [i + 1 for i in [LGPL3, MerryChristmas]] ;) -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/

Re: [web2py] Re: When to use "lambda"?

2010-12-21 Thread Branko Vukelić
On Wed, Dec 22, 2010 at 12:13 AM, Stefaan Himpe wrote: >> myfunction(lambda x: print 'Eat %s!' % x) >> >> and that would print 'Eat this!'. > > Ahm... :) > You can't use print in lambda as it is a statement, not an expression (in > python 2.x at least) Yah, I know. I've corrected myself. But I gu

Re: [web2py] It is done GPL2 -> LGPL3

2010-12-21 Thread Bruno Rocha
> > Reason for the change? > > - Eliminate some ambiguities with the current license + exception > - Allow web2py to incorporate Apache code if needed (Google releases > under Apache) > - Give you the ability to use web2py modules in non-web2py apps (the > new dal for example) > - Expand the user b

[web2py] Re: It is done GPL2 -> LGPL3

2010-12-21 Thread Martin.Mulone
LGPL3 +1 Merry Christmas +1

[web2py] It is done GPL2 -> LGPL3

2010-12-21 Thread mdipierro
For now trunk only. This will propagate to stable since 1.91.1 Reason for the change? - Eliminate some ambiguities with the current license + exception - Allow web2py to incorporate Apache code if needed (Google releases under Apache) - Give you the ability to use web2py modules in non-web2py app

Re: [web2py] Re: look ma, no flash!

2010-12-21 Thread Michele Comitini
I can't play elevator as much as I would like :( it crashes the chrome window 2010/12/22 mdipierro : > Did you see this? > > http://craftyjs.com/ > > On Dec 21, 5:27 pm, Michele Comitini > wrote: >> yes I suspect there is a lot of cut&paste... >>  many have the running background, but some are di

[web2py] Re: look ma, no flash!

2010-12-21 Thread mdipierro
Did you see this? http://craftyjs.com/ On Dec 21, 5:27 pm, Michele Comitini wrote: > yes I suspect there is a lot of cut&paste... >  many have the running background, but some are different: > > http://voidstudio.eu/newdesign/http://spritely.net/filipealcada/http://www.naplntemisky.cz/hra/http:/

Re: [web2py] Cache stored at request, does not sync with other threads until new request

2010-12-21 Thread Tim Alexander
It occurs to me, I'm using uwsgi. I'm assuming cache.ram is per process, meaning that if my Ajax side and xmlrpc side are not on the same process, this will completely not work properly. I'll try flipping over to cache.disk tomorrow morning to verify. On Dec 21, 2010 5:20 PM, "Dragonfyre13" wrote:

[web2py] Re: customizing registration layout

2010-12-21 Thread mdipierro
You have to make it manually On Dec 21, 4:58 pm, Plumo wrote: > what about the password2 field?

Re: [web2py] look ma, no flash!

2010-12-21 Thread Michele Comitini
yes I suspect there is a lot of cut&paste... many have the running background, but some are different: http://voidstudio.eu/newdesign/ http://spritely.net/filipealcada/ http://www.naplntemisky.cz/hra/ http://www.pinkpigeon.net/ (go on those pigeons below :-) ) 2010/12/21 Branko Vukelić : > Y

[web2py] Cache stored at request, does not sync with other threads until new request

2010-12-21 Thread Dragonfyre13
At least I think the subject seems to define the behavior. I have a function that exposes as an XMLRPC service. It puts something in a DB, and then polls to see if there is a response to it from another system talking to that same DB. (yes I realize that polling a DB is a "bad thing" but necessary

[web2py] Re: When to use "lambda"?

2010-12-21 Thread Stefaan Himpe
myfunction(lambda x: print 'Eat %s!' % x) and that would print 'Eat this!'. Ahm... :) You can't use print in lambda as it is a statement, not an expression (in python 2.x at least)

[web2py] Re: customizing registration layout

2010-12-21 Thread Plumo
what about the password2 field?

Re: [web2py] look ma, no flash!

2010-12-21 Thread Branko Vukelić
Yup. It's great. I've looked at the demos, though, and they all sort of work the same way. Not very versatile if demo is all there is to it. On Tue, Dec 21, 2010 at 11:46 PM, Michele Comitini wrote: > Branko, > > did you try to click on those fat black birds and then click somewhere > else on the

Re: [web2py] look ma, no flash!

2010-12-21 Thread Michele Comitini
Branko, did you try to click on those fat black birds and then click somewhere else on the window? 2010/12/21 Branko Vukelić : > Damn, that's nice. > > On Tue, Dec 21, 2010 at 11:31 PM, Michele Comitini > wrote: >> http://spritely.net/ >> > > > > -- > Branko Vukelic > > stu...@brankovukelic.com

Re: [web2py] Re: Syntax to INNER JOIN table to itself

2010-12-21 Thread Michael Wolfe
You're right, that should work. I wonder if there would be a significant performance hit running a LEFT JOIN in place of an INNER JOIN. I'll have to keep an eye on that to see if it makes much difference, but in my particular case (less than 100 records) I think I'll be fine. Thanks for the quic

Re: [web2py] look ma, no flash!

2010-12-21 Thread Branko Vukelić
Damn, that's nice. On Tue, Dec 21, 2010 at 11:31 PM, Michele Comitini wrote: > http://spritely.net/ > -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/

[web2py] look ma, no flash!

2010-12-21 Thread Michele Comitini
http://spritely.net/

[web2py] Re: Syntax to INNER JOIN table to itself

2010-12-21 Thread mdipierro
yes alias only works with left joins. But you can mimic one with the other to I tried this which I think is equivalent to your query: db=DAL() District = db.define_table('district',Field('description'),Field('district_id','reference district')) SchoolDistrict = District.with_alias('school_distric

Re: [web2py] Re: it case you missed it...

2010-12-21 Thread Branko Vukelić
On Tue, Dec 21, 2010 at 11:08 PM, mdipierro wrote: > Perhaps I should add a new exception: "you loose the license to use > web2py if you complain about web2py or its license". ;-) "for 1000 years or life, whichever comes last" ;) -- Branko Vukelic stu...@brankovukelic.com http://www.brankovuk

Re: [web2py] Re: Syntax to INNER JOIN table to itself

2010-12-21 Thread Michael Wolfe
I'm actually running off of trunk already (latest changeset is 1410 (feb4ddb2d659), committed 14 hours ago). The book example only demonstrates using with_alias in LEFT JOINs. Is this a limitation? If it makes any difference, I am running dal.py as a standalone module for a non-web2py project.

[web2py] Re: it case you missed it...

2010-12-21 Thread mdipierro
Looks like we have enough consensus. The people who so far opposed to a license change seem to be in favor of this change. As soon as I can fix the open issues I will change the license for 1.91.1 to LPGL3 and, after that do, I do not want to hear anything any more about the license. Perhaps I sho

[web2py] Re: When to use "lambda"?

2010-12-21 Thread cjrh
On Dec 21, 11:53 pm, cjrh wrote: > Because Python's scoping rules are strict and clean, we can even do > the following: > > my_list_of_functions = [lambda x, i=i : x + j for i in range(10)] To my shame, this should have been: my_list_of_functions = [lambda x, i=i : x + i for i in range(10)] Apo

[web2py] Re: Syntax to INNER JOIN table to itself

2010-12-21 Thread mdipierro
there is a bug in 1.90.6 about with_alias. I think it is fixed in trunk. give it a try. On Dec 21, 3:46 pm, mwolfe02 wrote: > I have a legacy table with a three-character primary key and a three- > character self-referencing field.  I'm trying to implement the > following sql using the DAL: > > S

Re: [web2py] Re: it case you missed it...

2010-12-21 Thread Kuba Kucharski
+1

[web2py] Re: Left Join with aliased table and the new DAL

2010-12-21 Thread mdipierro
hmm... I am trying your select and it now generates the same sql as the old dal. please try this: Domain = db.domain Client = db.client Manager = db.contact.with_alias('manager') sql = db(Domain.id==1)._select( Domain.ALL, Client.ALL,Manager.ALL, left=[Client.on(Client.id==Domain.client_i

Re: [web2py] Re: When to use "lambda"?

2010-12-21 Thread Jonathan Lundell
On Dec 21, 2010, at 1:37 PM, cjrh wrote: > > On Dec 21, 10:36 pm, pbreit wrote: >> I see lambda used quite a bit and don't totally understand the concept. Is >> there a simple rule to follow to know when it is necessary to use? > Another answer to the original question is that there are places

[web2py] Re: When to use "lambda"?

2010-12-21 Thread cjrh
On Dec 21, 11:37 pm, cjrh wrote: > def g(i): >     def f(x): >         return x + i >     return f > my_list_of_functions = [g(i) for i in range(10)] I suspect the following won't be of immediate use to you, but it is worth hearing about right now, even if it'll only make sense sometime later in

Re: [web2py] When to use "lambda"?

2010-12-21 Thread Branko Vukelić
On Tue, Dec 21, 2010 at 9:36 PM, pbreit wrote: > I see lambda used quite a bit and don't totally understand the concept. Is > there a simple rule to follow to know when it is necessary to use? You can get away with NEVER using lambda. But it's cool to know it. Lambda is basically a function that

[web2py] Re: Left Join with aliased table and the new DAL

2010-12-21 Thread HaM
I just tried with the last revision (1414:da25156addab) and the problem stills the same.

[web2py] Syntax to INNER JOIN table to itself

2010-12-21 Thread mwolfe02
I have a legacy table with a three-character primary key and a three- character self-referencing field. I'm trying to implement the following sql using the DAL: SELECT District.Description, SchoolDistrict.Description FROM District.DistrictID INNER JOIN District AS SchoolDistrict ON District.Schoo

[web2py] Re: When to use "lambda"?

2010-12-21 Thread cjrh
On Dec 21, 10:36 pm, pbreit wrote: > I see lambda used quite a bit and don't totally understand the concept. Is > there a simple rule to follow to know when it is necessary to use? Code A: f = lambda x,y: x + y Code B: def f(x,y): return x + y If you can remember that Code A is *exactly*

[web2py] Re: When to use "lambda"?

2010-12-21 Thread Anthony
And if you're interested, the name "lambda" itself comes from lambda calculus: http://en.wikipedia.org/wiki/Lambda_calculus http://en.wikipedia.org/wiki/Lambda_calculus#First-class_functions http://en.wikipedia.org/wiki/Anonymous_functions On Tuesday, December 21, 2010 4:02:36 PM UTC-5, stefa

[web2py] Re: When to use "lambda"?

2010-12-21 Thread Stefaan Himpe
pbreit wrote: I see lambda used quite a bit and don't totally understand the concept. Is there a simple rule to follow to know when it is necessary to use? Sometimes you need to pass a function as an argument to another function. In that case you have a choice to 1. define a separate functio

[web2py] Re: Possible typo in book

2010-12-21 Thread cjrh
On Dec 21, 10:34 pm, Jonathan Lundell wrote: > Per the code, it should be None. Same for IS_IN_DB. Fixed, thanks for checking.

[web2py] Re: When to use "lambda"?

2010-12-21 Thread Arun K.Rajeevan
lambda is functional programming bit. :-) Well, you can use lambda to 1) define anonymous functions 2) one liner functions 3) to modify a function to behave the way you want (instead of defining another function that just call this function with desired params) etc, to name just few, that came i

Re: [web2py] Re: it case you missed it...

2010-12-21 Thread Michele Comitini
+1 2010/12/21 mdipierro : > Because I do not want closed source commercial derivatives. I am > against people stealing other people work. >

[web2py] When to use "lambda"?

2010-12-21 Thread pbreit
I see lambda used quite a bit and don't totally understand the concept. Is there a simple rule to follow to know when it is necessary to use?

Re: [web2py] Re: Possible typo in book

2010-12-21 Thread Jonathan Lundell
On Dec 21, 2010, at 12:26 PM, cjrh wrote: > > On Dec 21, 9:10 pm, Jim Karsten wrote: >> In web2py book, chapter 7 Forms and Validators, IS_IN_SET section, >> second paragraph, should this line: >> If you do not want a "choose one" option, set zero=False >> be: >> If you do not want a "cho

[web2py] Re: Possible typo in book

2010-12-21 Thread cjrh
On Dec 21, 9:10 pm, Jim Karsten wrote: > In web2py book, chapter 7 Forms and Validators, IS_IN_SET section, > second paragraph, should this line: >     If you do not want a "choose one" option, set zero=False > be: >     If you do not want a "choose one" option, set zero=None Can you confirm that

Re: [web2py] Re: Formatted data entries

2010-12-21 Thread Johann Spies
On 21 December 2010 18:08, mdipierro wrote: > I think you just need: > > db.mytable.myfield.represent=lambda x: XML(x,sanitize=True) > Thanks. I will try it. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power

[web2py] Possible typo in book

2010-12-21 Thread Jim Karsten
In web2py book, chapter 7 Forms and Validators, IS_IN_SET section, second paragraph, should this line: If you do not want a "choose one" option, set zero=False be: If you do not want a "choose one" option, set zero=None Jim Karsten

[web2py] Re: Run Web2py as a Service? on Ubuntu Lucid?

2010-12-21 Thread Christopher Steel
Hi, Mine seemed to work fine right off the bat with Lucid using the installation scripts that are included in web2py/scripts. I am doing some automated installation testing so I will let you know if I run into any issues and how I fixed them. In the mean time I am wondering why Web2py is in usr/l

[web2py] Re: Requires login decorator error

2010-12-21 Thread Brad Corson
I saw where the default was being set, but couldn't find anywhere that we were overriding that value. I will tour through it again and see if I can pick it out this time. Thanks, Brad On Dec 21, 12:37 pm, mdipierro wrote: > By default it should be > > auth.settings.on_failed_authentication = lam

[web2py] Re: How to do this in web2py..?

2010-12-21 Thread villas
I think you ideally need an object database system. I don't have experience with that, but I understand Zope might be of interest. Take a look at this: http://en.wikipedia.org/wiki/List_of_object_database_management_systems -D On Dec 21, 4:47 am, Fabiano wrote: > Hi Villas, > > yes, I know th

[web2py] Re: parse_get_post_vars change

2010-12-21 Thread Brad Corson
Thanks for the reply Massimo. Now that I know it was intentional, I will see what I can do about implementing the changed behavior in our app. --Brad On Dec 21, 12:35 pm, mdipierro wrote: > I apologize I missed this line. I am sorry this is not possible. If a > variable appears twice, the correc

[web2py] Re: Using existing database

2010-12-21 Thread mdipierro
If each table has a unique auto-increment id field (even if not called id) and if this is the only only field used to build references things are easy. If they use other primary keys, things will be more complex and the easiest solution would be to migrate the database and give every field a uniq

[web2py] Re: Upload files with accepting only (png, gif, jpg)

2010-12-21 Thread Luther Goh Lu Feng
Use IS_IMAGE(extensions=('jpeg', 'png', 'gif')) to limit to these file formats ttp://web2py.com/book/default/chapter/07?search=IS_IMAGE On Dec 21, 10:17 pm, Luther Goh Lu Feng wrote: > Try > > db,define_table('image;, >     Field('image, 'upload', notnull=True, requires=[IS_IAMGE()]), > > ) > >

[web2py] Using existing database

2010-12-21 Thread Rock
I'm trying to convince the company I work for to use Web2Py. However, we already have a database with the data we have to use for our web app (from a previous one). So the question is this: is it possible to incorporate an already existing database (tables and all the data) as a model in a new web

Re: [web2py] Re: web2py 1.90.6 is OUT

2010-12-21 Thread Bruno Rocha
2010/12/21 Anthony > It was a test. You were supposed to select the correct character from > "@#$%". You passed. :-) > I almost picked the wrong character, it was pure luck! :o) LOL Guess this was a test strategy to see who is really testing trunk, a presence ping! :P -- Bruno Rocha http://

[web2py] Re: Left Join with aliased table and the new DAL

2010-12-21 Thread mdipierro
I think this is now fixed in trunk. Can you give it a try? Massimo On Dec 21, 9:25 am, HaM wrote: > Hi everyone, > > I currently use Web2py for an internal corporation application. I > recently upgraded from 1.89 to 1.90-6. Since this upgrade all my left > joins with aliased table don't work any

Re: [web2py] Re: web2py 1.90.6 is OUT

2010-12-21 Thread Anthony
It was a test. You were supposed to select the correct character from "@#$%". You passed. :-) On Tuesday, December 21, 2010 12:59:12 PM UTC-5, Bruno Rocha wrote: > it is just a missing # in dal.py. > > 2010/12/21 mdipierro > >> @#$% >> >> On Dec 21, 11:21 am, Bruno Rocha wrote: >> > I just

Re: [web2py] Re: web2py 1.90.6 is OUT

2010-12-21 Thread Bruno Rocha
it is just a missing # in dal.py. 2010/12/21 mdipierro > @#$% > > On Dec 21, 11:21 am, Bruno Rocha wrote: > > I just pulled trunk and got this error: > > > > rochacbr...@macubuntu:~$ python projects/web2py/web2py.py -a 1234 > > Traceback (most recent call last): > > File "/home/rochacbruno/pr

[web2py] Re: web2py 1.90.6 is OUT

2010-12-21 Thread mdipierro
@#$% On Dec 21, 11:21 am, Bruno Rocha wrote: > I just pulled trunk and got this error: > > rochacbr...@macubuntu:~$ python projects/web2py/web2py.py -a 1234 > Traceback (most recent call last): >   File "/home/rochacbruno/projects/web2py/gluon/sql.py", line 5, in >     from dal import DAL, Field

[web2py] Re: Requires login decorator error

2010-12-21 Thread mdipierro
By default it should be auth.settings.on_failed_authentication = lambda x: redirect(x) auth.settings.on_failed_authentication can be a function or a url. You must set it to None somewhere. On Dec 16, 8:02 pm, NuclearDragon wrote: > I was getting an error when attempting to go to a page that r

[web2py] Re: parse_get_post_vars change

2010-12-21 Thread mdipierro
I apologize I missed this line. I am sorry this is not possible. If a variable appears twice, the correct thing to to is to have a list in request.vars. If we were to elminate duplicates we could no longer detect the case when duplicates are intentional. Probably in your case the duplicate is due

[web2py] Re: Upload files with accepting only (png, gif, jpg)

2010-12-21 Thread VP
http://web2py.com/book/default/chapter/07?search=IS_UPLOAD_FILENAME On Dec 21, 7:02 am, pk wrote: > hi, > > how can i realise this? > > thanks > peter

[web2py] Re: default values in options widget

2010-12-21 Thread max
ok actually I thought I have sovled my problem with writing None values to the database with this: >>> IS_IN_SET({None :'unknown', 'option_1:'Option 1'}, zero = None) in stead of: >>> IS_IN_SET(['unknown', 'option_1'], zero = None) but you are right, this only works when I use curd.create the

Re: [web2py] Re: web2py 1.90.6 is OUT

2010-12-21 Thread Bruno Rocha
I just pulled trunk and got this error: rochacbr...@macubuntu:~$ python projects/web2py/web2py.py -a 1234 Traceback (most recent call last): File "/home/rochacbruno/projects/web2py/gluon/sql.py", line 5, in from dal import DAL, Field, Table, Query, Set, Expression, Row, Rows, drivers, BaseA

[web2py] Re: web2py.com is down

2010-12-21 Thread weheh
AOK. Back again. On Dec 21, 11:48 am, Martín Mulone wrote: > Work for me. No slowness here. > > 2010/12/21 LightDot : > > > Works for me. Tried from locations in USA (Texas), Slovenia and Serbia... > > Yes, the site responds a bit slower than usual. > > > Traceroute looks ok. Let me know if you n

[web2py] Re: Requires login decorator error

2010-12-21 Thread Brad Corson
Any insights as to why self.settings.on_failed_authentication is None at this point? Should I be setting that value somewhere? It's difficult for me to tell what the value should be, since with my change it still returns to the login page with a flash message of "Invalid Login". On Dec 16, 9:02 p

[web2py] Re: parse_get_post_vars change

2010-12-21 Thread Brad Corson
So, does anyone have any thoughts on why request.vars was changed in this way? Is this a good way in which I can patch this parsing function? Or should I rewrite all of those places in our app? Thanks! On Dec 17, 12:34 pm, NuclearDragon wrote: > So, I am in the process of upgrading Web2py from

Re: [web2py] Re: web2py.com is down

2010-12-21 Thread Martín Mulone
Work for me. No slowness here. 2010/12/21 LightDot : > Works for me. Tried from locations in USA (Texas), Slovenia and Serbia... > Yes, the site responds a bit slower than usual. > > Traceroute looks ok. Let me know if you need any connectivity/speed tests > done... I tried downloading web2py rele

[web2py] Re: web2py.com is down

2010-12-21 Thread LightDot
Works for me. Tried from locations in USA (Texas), Slovenia and Serbia... Yes, the site responds a bit slower than usual. Traceroute looks ok. Let me know if you need any connectivity/speed tests done... I tried downloading web2py release and just about maxed out the 10 mbit line here. I can tr

[web2py] Re: Left Join with aliased table and the new DAL

2010-12-21 Thread mdipierro
Thanks for reporting this. It is definitively a bug and I will try fix it today. On Dec 21, 9:25 am, HaM wrote: > Hi everyone, > > I currently use Web2py for an internal corporation application. I > recently upgraded from 1.89 to 1.90-6. Since this upgrade all my left > joins with aliased table d

[web2py] Re: web2py.com is down

2010-12-21 Thread mdipierro
It is not down but somehow it is incredibly show. The problem is not with the server but looks more like a bandwidth problem. Let's way today and see if it is temporary. Massimo On Dec 21, 10:22 am, Bruno Rocha wrote: > Yep, same here. Nor .com or .org something happen on the server. > > may be

Re: [web2py] Re: web2py.com is down

2010-12-21 Thread Thadeus Burgess
http://wasitup.com/ -- Thadeus On Tue, Dec 21, 2010 at 10:22 AM, Bruno Rocha wrote: > Yep, same here. Nor .com or .org something happen on the server. > > may be we need an HA mirror.the examples app running on GAE could be a > second choice when main server goes down. > (http://web2pysite.

Re: [web2py] Re: web2py.com is down

2010-12-21 Thread Bruno Rocha
Yep, same here. Nor .com or .org something happen on the server. may be we need an HA mirror.the examples app running on GAE could be a second choice when main server goes down. (http://web2pysite.appspot.com/examples/default/index) if there is a way to keep it updated and a default route when se

[web2py] Re: web2py.com is down

2010-12-21 Thread DenesL
Same here. On Dec 21, 11:14 am, weheh wrote: > tried accessing it right now but no response

[web2py] web2py.com is down

2010-12-21 Thread weheh
tried accessing it right now but no response

[web2py] Re: default values in options widget

2010-12-21 Thread mdipierro
You do not sent it in the widget.You have to set the "default" attribute for the field. On Dec 21, 5:01 am, max wrote: > Hi, > is it possible to set a default value to a widgets.options.widget? > > model: > db = DAL('sqlite://storage.sqlite') > db.define_table('mytable', >     Field('options_1',

[web2py] Re: Recent Posts in plugin_wiki

2010-12-21 Thread mdipierro
If you put {{include 'recentPosts.html'}} in layout.html than the view 'recentPosts.html' is included in the layout but the corresponding action is not called. Try replace {{include 'recentPosts.html'}} with {{=LOAD('default','recentPosts',ajax=True)}} On Dec 21, 6:53 am, nic wrote: > Hi, >

[web2py] Re: Error in web2py book

2010-12-21 Thread mdipierro
thanks. On Dec 21, 3:17 am, cjrh wrote: > On Dec 21, 4:26 am, Martin H wrote: > > > It should be the other way around: > > > where 3,4,5 are replicated servers and 1,2,3 are slaves. > > Fixed. > > > The section should also be changed to: Using Replicated Database Servers > > OR Using Replicated

[web2py] Re: Formatted data entries

2010-12-21 Thread mdipierro
I think you just need: db.mytable.myfield.represent=lambda x: XML(x,sanitize=True) On Dec 21, 3:03 am, Johann Spies wrote: > I have in the past asked a similar question and could not find a solution. > I am trying again.  I have to read in thousands of records into a database > and some entrie

Re: [web2py] another funtion in view

2010-12-21 Thread Jonathan Lundell
On Dec 21, 2010, at 3:31 AM, Sahil Arora wrote: > > no , i know this. > But i want to use a function say view( ) as well as index( ) in index.html. > I want to use the output of view( ) in index.html Martin has the right idea, I think. Factor out the common logic and call it from view() and inde

Re: [web2py] How to do this in web2py..?

2010-12-21 Thread Ole Martin Maeland
http://www.web2pyslices.com/main/slices/take_slice/85 On Mon, Dec 20, 2010 at 10:13 AM, Fabiano wrote: > Hi, > > I am new to web2py and sure not if I am doing things the best way. I > am designing an app and would like your opinion on my choices and also > how could I implement some stuff in web

[web2py] Left Join with aliased table and the new DAL

2010-12-21 Thread HaM
Hi everyone, I currently use Web2py for an internal corporation application. I recently upgraded from 1.89 to 1.90-6. Since this upgrade all my left joins with aliased table don't work any more. I'm using Web2py with Postgres. For example I have this in a controller exposed function: Doma

[web2py] Re: default values in options widget

2010-12-21 Thread max
Hi, sorry i was to hasty posting my problem. The easiest way to solve this problem is to change: db.mytable.options_1.requires = [IS_IN_SET(['option_1', 'option_2', 'option_3', 'option_4', 'unknown'], zero = None)] into: db.mytable.options_1.requires = [IS_IN_SET({'option_1' : 'Option 1', 'opt

  1   2   >