[web2py] Re: problem (?) with SQLTABLE linkto

2010-05-26 Thread Peter Etchells
linkto can be customised, according to the source: eg like def linkto_table(id, type, ref): return URL(r=request, c='default', f='%s_show'%type, args=[id]) comment in sqlhtml.py: Simple linkto example:: rows = db.select(db.sometable.ALL) table = SQLTABLE(rows,

[web2py] Re: web2py Conference Management System

2010-05-26 Thread Yarko Tymciurak
Mariano - Thank you - I hadn't seen that you made a clone. FYI for others: you can the list of clones at: http://code.google.com/p/web2conf/source/clones I will look over this in June, and look at merging back (there are things in the base web2conf that need cleanup, updates - which looks like

[web2py] Re: Production releases

2010-05-26 Thread GoldenTiger
Ok, really I did not explain very well Software testing has different levels of testing http://en.wikipedia.org/wiki/Software_testing#Testing_levels Some vulnerabilities in Top 10 OWASP depends on other elections like webserver or O.S. Frameworks can't avoid this point, but can protect itself ag

[web2py] Re: Newbie question on self-submitting form

2010-05-26 Thread NoNoNo
Hi Massimo, Thanks for the reply. I tried your codes and the Previous and Next works well, however the self-submitting form is still not functioning. Input any page number and submit, still on the current page. I'm not sure about the mechanism how the progrom respond to a form submission, because

[web2py] Re: apache proxy error

2010-05-26 Thread Graham Dumpleton
On May 27, 1:10 pm, Richard wrote: > On May 26, 9:58 pm, Graham Dumpleton > wrote: > > > > > > > On May 26, 3:26 pm, Richard wrote: > > > > Occasionally after heavily using my web2py app I get: > > > > """ > > > Proxy Error > > > > The proxy server received an invalid response from an upstream

Re: [web2py] Re: Planet web2py

2010-05-26 Thread Mariano Reingart
On Wed, May 26, 2010 at 11:15 PM, mdipierro wrote: > How do you define "web2py-planet"? A site that read feeds about web2py, publish them in a single webpage, and provides a new feed where all entries are included: http://en.wikipedia.org/wiki/Planet_(software) Although it is mainly used to agg

Re: [web2py] Planet web2py

2010-05-26 Thread Alexandre Andrade
>or, is >there any repository for web2py related application/plugins/slices?) yes. The web2py.com has a place for applications (appliances) http://web2py.com/appliances Just send it to Massimo: mdipie...@cs.depaul.edu 2010/5/26 Mariano Reingart > I'm working with rss2 and feedparser, reac

[web2py] Re: apache proxy error

2010-05-26 Thread Richard
On May 26, 9:58 pm, Graham Dumpleton wrote: > On May 26, 3:26 pm, Richard wrote: > > > Occasionally after heavily using my web2py app I get: > > > """ > > Proxy Error > > > The proxy server received an invalid response from an upstream server. > > The proxy server could not handle the request GET

Re: [web2py] Re: Changes in Development environment

2010-05-26 Thread Alexandre Andrade
Well, if it don't get problems with new tables/fields (migrating), its is the solution I was looking for. I just sugest separate the db connections config out of db.py in models, creating a file 0db_config.py (or similar), to be preserved. Usually, the settings of database connection(s) are difere

[web2py] Re: A basic problem about threading and time consuming function...

2010-05-26 Thread Allard
I won't have time to work out a async proof of concept at this time. I hope to get this after some more real world profiling with my web2py app though. To give you an idea of how an async web framework could feel as natural in programming style as web2py (eg. no call backs all over the place), have

[web2py] Re: MySQLdb - problem with Lock wait timeout exceeded; try restarting transaction

2010-05-26 Thread mdipierro
Can you describe the error? Do you get wrong sorting? That would be known bug in the plugin is you have two windows displaying the same elements. On May 26, 2:20 pm, RobertVa wrote: > Today I encountered unusual error, while ajax sorting list thru jquery > sortable interface and at the same time

Re: [web2py] A quick question for everyone - generating a random code 'onvalidation'

2010-05-26 Thread Mr admin
OK here's an example of counting matching records with web2py syntax. SQL version select count(*) from tbbooks where id = 1 group by id; Note! if you don't add the GROUP BY clause, you'll get a count of 1 record... even if there a NO MATCHES probably NOT what you intended to do. The

[web2py] Re: Possible typo in \web2py\gluon\contrib\gql.py

2010-05-26 Thread mdipierro
Oops. Fixing the first problem in trunk. The second error indicates that db.table.id is a very special field on GAE therefore you can do query = db.table.id>0 query = db.table.id==value but you cannot use it any other query like db.table.id < 10 db.table.id > 5 db.table.id != 7 On May 26, 9:

[web2py] Re: Planet web2py

2010-05-26 Thread mdipierro
How do you define "web2py-planet"? On May 26, 2:54 pm, Mariano Reingart wrote: > On Wed, May 26, 2010 at 8:09 AM, Álvaro Justen wrote: > > > What do you think on creating a public repository on BitBucket.org or > > GitHub.org? So we can collaborate with you sending patches, tracking > > issues e

[web2py] Re: Possible Typo in C:\Program Files\Google\google_appengine\web2py\gluon\contrib\gql.py

2010-05-26 Thread NoNoNo
Sorry for the re-submission. Something wrong with my connection, got a failure when submit. Someone plz delete duplicated posts.

[web2py] Re: Changes in Development environment

2010-05-26 Thread mdipierro
How about a flag when replacing an app via admin that preserves the content of databases/ sessions/ errors/ uploads/ cache/ ? On May 26, 1:08 pm, greenpoise wrote: > Hmmm..I see. Tough stuff. I wonder if there is room for improvement in > that area for web2py. Something that is transparent betwe

[web2py] Re: MySQLdb connect() issues

2010-05-26 Thread mdipierro
Thanks for testing dal.py and reporting this. I will upload your fix in trunk. On May 26, 9:37 am, Evan wrote: > Hey all, > > I hit an issue in the MySQLAdapter class trying to establish a > database connection. It seems the "password" keyword argument in > connect() should be "passwd"? The pytho

[web2py] Possible Typo in C:\Program Files\Google\google_appengine\web2py\gluon\contrib\gql.py

2010-05-26 Thread NoNoNo
I was running an app in GAE dev server, an error was encountered while hit some function. According to the ticket, the error is : NameError: global name 'RuntumeError' is not defined I assume it would be RuntimeError. Open the the gql.py and corrected it. This error disappeared. However, there is

[web2py] Re: Anybody going to PyCon?

2010-05-26 Thread mdipierro
I'd love to see some slides of this. On May 26, 9:25 am, JC11 wrote: > I sang the praises of web2py at Euro-Python last spring.  My talk was > not about web2py or web frameworks but about a (very corporate) > application written with web2py. > > Perhaps more talk of what has been built with web2p

[web2py] Possible Typo in C:\Program Files\Google\google_appengine\web2py\gluon\contrib\gql.py

2010-05-26 Thread NoNoNo
I was running an app in GAE dev server, an error was encountered while hit some function. According to the ticket, the error is : NameError: global name 'RuntumeError' is not defined I assume it would be RuntimeError. Open the the gql.py and corrected it. This error disappeared. However, there is

[web2py] Re: Multiselect Plugin not saving values in database.

2010-05-26 Thread mdipierro
It works when I use it so I am not sure. Can you isolate the problem? Can you provide a simpler model/controller to reproduce the problem? On May 26, 9:22 am, ggivler wrote: > Tried the reference thing but that doesn't work. I am still not sure > why your code does not put the values in the datab

[web2py] Re: Newbie question on self-submitting form

2010-05-26 Thread mdipierro
The problem is that form should be before select. Anyway you do not need to actions. I suggest the following changes: def index(): items_page=20 page_no=int(request.args(0) or 0) limitby=(items_page*page_no,items_page*page_no+items_page+1) #notice + 1 form=crud.create(db.whoelse,n

[web2py] Possible typo in \web2py\gluon\contrib\gql.py

2010-05-26 Thread NoNoNo
I was running an app in GAE dev server, an error was encountered while hit some function. According to the ticket, the error is : NameError: global name 'RuntumeError' is not defined I assume it would be RuntimeError. Open the the gql.py and corrected it. This error disappeared. However, there is

Re: [web2py] postgresql connection problem

2010-05-26 Thread Thadeus Burgess
Try postgres://w2p:passw...@localhost:5432/w2p -- Thadeus On Wed, May 26, 2010 at 5:17 PM, Julius Minka wrote: > This is virtual server with centos 5.5 in internet. > I have successfully instaled web2py with Apache and mod_wsgi based > mainly on instructions from > http://web2py.com/AlterEg

[web2py] Re: scripts/setup-web2py-ubuntu.sh and web2py.ubuntu.sh incompatible?

2010-05-26 Thread Christopher Steel
Hi Doug, For local development setup-web2py-ubuntu.sh is probably the way you want to go. I have not used the other script, web2py-ubuntu.sh but it appears to be startup (init.d) script for Debian based Linux servers. In other words it allows you to automatically start Web2py on bootup of a (prod

[web2py] postgresql connection problem

2010-05-26 Thread Julius Minka
This is virtual server with centos 5.5 in internet. I have successfully instaled web2py with Apache and mod_wsgi based mainly on instructions from http://web2py.com/AlterEgo/default/show/239 and http://web2py.com/AlterEgo/default/show/240 Probably last step is missing. I am getting this error wh

[web2py] Re: Top 3 web2py features

2010-05-26 Thread weheh
1) One language -- python (other systems have multiple languages or non-standard languages such as Ruby) 2) Batteries included: - built-in authentication and security against various hacks - built-in admin interface - built-in json, xml, rss, screen-scraper ... interfaces/facilities - buil

[web2py] Re: A quick question for everyone - generating a random code 'onvalidation'

2010-05-26 Thread NetAdmin
Sort of like this mysql> select id from tbbooks where id = 8; Empty set (0.00 sec) mysql> select id from tbbooks where id = 1; ++ | id | ++ | 1 | ++ 1 row in set (0.00 sec) On May 26, 2:44 pm, scausten wrote: > I'm adding files content to my database with the following code bei

[web2py] Re: A quick question for everyone - generating a random code 'onvalidation'

2010-05-26 Thread NetAdmin
Instead of codes = db().select(db.products.code) # Grabs all the existing codes how about something like, # generate random code code = generatecode() # look to see if a matching code is in the table select stored_code from table where stored_code =code # if no code is returned... th

Re: [web2py] Planet web2py

2010-05-26 Thread Mariano Reingart
On Wed, May 26, 2010 at 8:09 AM, Álvaro Justen wrote: > > What do you think on creating a public repository on BitBucket.org or > GitHub.org? So we can collaborate with you sending patches, tracking > issues etc. I've created a repository on google code (I don't use bb or git by now): http://cod

[web2py] A quick question for everyone - generating a random code 'onvalidation'

2010-05-26 Thread scausten
I'm adding files content to my database with the following code being called onvalidation when the form is submitted. It really simply generates a 6-digit alphanumeric code as an identifier for the file: codes = db().select(db.products.code) # Grabs all the existing codes from the database while

Re: [web2py] Re: web2py Conference Management System

2010-05-26 Thread Mariano Reingart
On Wed, May 26, 2010 at 2:19 PM, Yarko Tymciurak wrote: > > On May 26, 9:23 am, KR wrote: >> Hello, >> >> There is a Vimeo screencast (http://www.vimeo.com/1838049) about a >> web2py Conference Management System. Does anybody know wher I can >> download the soource code of that ? > > You can get

[web2py] MySQLdb - problem with Lock wait timeout exceeded; try restarting transaction

2010-05-26 Thread RobertVa
Today I encountered unusual error, while ajax sorting list thru jquery sortable interface and at the same time reading data from table, where sorting took place in a new browser window. Does this have to do with connection pooling and transactions? Here is function for sorting items, called thru

[web2py] Re: Changes in Development environment

2010-05-26 Thread Yarko Tymciurak
On May 26, 1:40 pm, Yarko Tymciurak wrote: > also consider: > > of the 3 places:  development, staging / final testing, and > deployment, > > some people stage by migrating / merging their existing site to a > staging site, and then take their current deployment site "down" and > deploy the stagin

[web2py] Re: Changes in Development environment

2010-05-26 Thread Yarko Tymciurak
also consider: of the 3 places: development, staging / final testing, and deployment, some people stage by migrating / merging their existing site to a staging site, and then take their current deployment site "down" and deploy the staging site --- this is the kind of thing you _might_ want to d

[web2py] Re: Changes in Development environment

2010-05-26 Thread Yarko Tymciurak
On May 26, 1:08 pm, greenpoise wrote: > Hmmm..I see. Tough stuff. I wonder if there is room for improvement in > that area for web2py. Something that is transparent between the > developer and the production site. Generally there are too many variables that depend on the target site (although th

[web2py] Re: Changes in Development environment

2010-05-26 Thread greenpoise
Hmmm..I see. Tough stuff. I wonder if there is room for improvement in that area for web2py. Something that is transparent between the developer and the production site. Thanks Dan On May 26, 1:28 pm, Yarko Tymciurak wrote: > On May 26, 11:53 am, greenpoise wrote: > > > Oh no, I am not develo

[web2py] Re: Changes in Development environment

2010-05-26 Thread Yarko Tymciurak
On May 26, 11:53 am, greenpoise wrote: > Oh no, I am not developing where the live data resides. But when I > make changes to my application on my development environment, how do I > transfer/update those changes on my production site? You have to work out a procedure that works with your product

[web2py] Re: web2py Conference Management System

2010-05-26 Thread Yarko Tymciurak
On May 26, 9:23 am, KR wrote: > Hello, > > There is a Vimeo screencast (http://www.vimeo.com/1838049) about a > web2py Conference Management System. Does anybody know wher I can > download the soource code of that ? You can get the version used at PyCon-2010 at code.google.com/p/ web2conf There

[web2py] Re: Changes in Development environment

2010-05-26 Thread greenpoise
Oh no, I am not developing where the live data resides. But when I make changes to my application on my development environment, how do I transfer/update those changes on my production site? On May 26, 12:36 pm, Thadeus Burgess wrote: > You probably don't want to develop on your live data. > >

Re: [web2py] Changes in Development environment

2010-05-26 Thread Thadeus Burgess
You probably don't want to develop on your live data. To be able to migrate data the DAL includes two functions.. db.export_to_csv_file(open('/path.csv', 'w')) db.import_from_csv_file(open('/path.csv', 'r')) So you can export your data, and then stick it on the server and re-import it. This also

[web2py] Re: web2py Database issues

2010-05-26 Thread Yarko Tymciurak
On May 26, 4:15 am, Neveen Adel wrote: > Hello, > >  i have a problem in the creation of new database > > I wrote my design into db.py : > > and then i run my application the tables was created only in > "appadmin", but when i show tables into mysql it displayed an empty > set. > > then any updat

[web2py] scripts/setup-web2py-ubuntu.sh and web2py.ubuntu.sh incompatible?

2010-05-26 Thread Doug Warren
Hi, I'm setting up a new dev environment for some users under Ubuntu 10 and I notice that the two supplied scripts in the scripts dir for dealing with Ubuntu seem to not be compatible... setup-web2py uses a 'www-data' directory with an install path in /home/www-data among other things. web2py.ubu

[web2py] web2py Conference Management System

2010-05-26 Thread KR
Hello, There is a Vimeo screencast (http://www.vimeo.com/1838049) about a web2py Conference Management System. Does anybody know wher I can download the soource code of that ?

[web2py] MySQLdb connect() issues

2010-05-26 Thread Evan
Hey all, I hit an issue in the MySQLAdapter class trying to establish a database connection. It seems the "password" keyword argument in connect() should be "passwd"? The python-mysql docs support this: http://mysql-python.sourceforge.net/MySQLdb.html#mysqldb If this is an issue of different vers

[web2py] Changes in Development environment

2010-05-26 Thread greenpoise
I have web2py production and my development environment. How would I go for leaving the data intact in my production? Is there a way? What I did is I packedAll the project and took it to my production but I will keep working on it on my development environment. Is this how it should be done? Tha

[web2py] Re: Anybody going to PyCon?

2010-05-26 Thread JC11
I sang the praises of web2py at Euro-Python last spring. My talk was not about web2py or web frameworks but about a (very corporate) application written with web2py. Perhaps more talk of what has been built with web2py rather than framework comparisons and moaning is the way to go ? John C.

[web2py] Re: Multiselect Plugin not saving values in database.

2010-05-26 Thread ggivler
Tried the reference thing but that doesn't work. I am still not sure why your code does not put the values in the database, just the separators so I get field with "|||" in them. But I can handle that in the routine below and update record. That will let me read it back out, I know this is a hack b

Re: [web2py] Re: Anybody going to PyCon?

2010-05-26 Thread Zoom.Quiet
i'll goto PyCon Asia Pacific : http://pycon.sit.rp.sg/conference-1 make the speech of: 35. PythoniCamp - Try to Train Practical Pythoners Fast On Sun, Jan 17, 2010 at 16:47, mdipierro wrote: > Of course. I have not given up on them. ;-) > > On Jan 17, 1:12 am, mikech wrote: >> Well, maybe n

[web2py] Nice web plugin, like jQZoom

2010-05-26 Thread KMax
http://www.professorcloud.com/mainsite/cloud-zoom.htm Looks great.

[web2py] Re: web2py hosting - least intervention required

2010-05-26 Thread greenpoise
Thanks for the replies. Just saw the limitations of GAE in the book. Dan On May 26, 1:35 am, Richard wrote: > I currently use Webfaction, Slicehost, and Google App Engine. > > Webfaction is cheap and relatively easy, but slow lately. Good support > in forums from admins. > Slicehost is FAST, but

[web2py] Re: web2py hosting - least intervention required

2010-05-26 Thread greenpoise
Thanks for all the replies. Is there a list of GAE limitations? Thanks On May 26, 1:35 am, Richard wrote: > I currently use Webfaction, Slicehost, and Google App Engine. > > Webfaction is cheap and relatively easy, but slow lately. Good support > in forums from admins. > Slicehost is FAST, but

[web2py] Newbie question on self-submitting form

2010-05-26 Thread NoNoNo
Hi, I'm quite new to web2py and currently building a simple application: a message board, listing latest 20 messages by index(). For earlier messages, there is a self-submitting form to enter page number (20 message each page) to go to, and after submitting the form, redirects to that page. Here

[web2py] Re: web2py Database issues

2010-05-26 Thread Candid
On your second question, you should use alternate notation: db.define_table("location_unit)",       SQLField("name", "string", notnull=True),       SQLField("parentLocation", "reference location_unit"),       ) See http://web2py.com/book/default/section/6/13 for details. As for your first qu

[web2py] Re: apache proxy error

2010-05-26 Thread Graham Dumpleton
On May 26, 3:26 pm, Richard wrote: > Occasionally after heavily using my web2py app I get: > > """ > Proxy Error > > The proxy server received an invalid response from an upstream server. > The proxy server could not handle the request GET /. > > Reason: Error reading from remote server > """ W

Re: [web2py] Planet web2py

2010-05-26 Thread Álvaro Justen
On Wed, May 26, 2010 at 01:58, Mariano Reingart wrote: > I'm working with rss2 and feedparser, reached a simple and minimal > web2py based planet. > > See working examples at: > > http://www.web2py.com.ar/planet/ > http://planeta.arpug.com.ar/ > > Uploaded web2py slice at: > > http://web2pyslices.

[web2py] web2py Database issues

2010-05-26 Thread Neveen Adel
Hello, i have a problem in the creation of new database I wrote my design into db.py : and then i run my application the tables was created only in "appadmin", but when i show tables into mysql it displayed an empty set. then any update in the tables it cause " ProgrammingError: (1146, "Table