Re: [web2py] Crud.select creates a table in textarea

2011-08-06 Thread Bruno Rocha
I guess you have to replace crud.select with db.select Crud returns a form using tables by default unless you specify formstyle parameter. In your case. You probably need only data as a value. So use db.select not crud.select http://zerp.ly/rochacbruno Em 06/08/2011 23:45, "Hybride" escreveu: >

[web2py] Crud.select creates a table in textarea

2011-08-06 Thread Hybride
Hi everyone, am not sure if this intentional, but I've found something curious (forgive me, if a repeat): when doing a crud.select for one field in my controller, and putting it in a form's textarea, the select is transformed into a table; however, if I simply print out the result, I get it withou

[web2py] Re: using sum with left join

2011-08-06 Thread Peter Etchells
try switching left and right: left=db.auth_user.on(db.auth_user.id == db.log.user) this will include all of the auth_user users records, with matching log users. Where there is no match, points will be None.

[web2py] Re: using sum with left join

2011-08-06 Thread Tim Korb
My understanding is that you use something like ifnull(sum(points), 0). If not, I guess I can do a separate query for the students with no entries and append 0s to the first result.

Re: [web2py] Re: using sum with left join

2011-08-06 Thread Bruno Rocha
Probably with subqueries. select (select sum(...) from. ..) as mysum, otherfield, otherfield... http://zerp.ly/rochacbruno Em 06/08/2011 20:02, "Massimo Di Pierro" escreveu: > How would you do it in SQL? I do not know. > > On Aug 6, 5:54 pm, Tim Korb wrote: >> I have a table ("log") of points a

[web2py] Re: using sum with left join

2011-08-06 Thread Massimo Di Pierro
How would you do it in SQL? I do not know. On Aug 6, 5:54 pm, Tim Korb wrote: > I have a table ("log") of points awarded to students for various activities. >  I want to produce a summary of total points per student.  This query > works... > > db().select(db.auth_user.ALL, db.log.points.sum(), >

[web2py] Re: web2py Contributor Agreement

2011-08-06 Thread Massimo Di Pierro
http://web2py.com/examples/static/web2py_contributor_agreement.pdf It is standard for open source projects. It basically means contributors retain full right on their contribution, but declare they are allowed to contribute and give me the right to distribute web2py, including their contribution,

[web2py] using sum with left join

2011-08-06 Thread Tim Korb
I have a table ("log") of points awarded to students for various activities. I want to produce a summary of total points per student. This query works... db().select(db.auth_user.ALL, db.log.points.sum(), left=db.log.on(db.auth_user.id == db.log.user), groupby=db.auth_user.id) but does not

[web2py] Re: Mix query and string types?

2011-08-06 Thread pbreit
Bump. So are gluon modules generally extendable or subclassable? Is there any documentation on how to go about it?

[web2py] Re: GAE Question

2011-08-06 Thread Stefaan Himpe
I decided to upgrade to the latest web2py version 1.98.2, then using the GAE app launcher for windows (version 1.5.2) I deployed it to the google server. when I try to go to the url.appspot.com then I got a server error 500. I believe there's currently an issue with GAE at google's side. Sever

[web2py] web2py Contributor Agreement

2011-08-06 Thread Web2Py Freak
what is it ??

[web2py] Re: GAE Question

2011-08-06 Thread Auden RovelleQuartz
I decided to upgrade to the latest web2py version 1.98.2, then using the GAE app launcher for windows (version 1.5.2) I deployed it to the google server. when I try to go to the url .appspot.com then I got a server error 500. then I try to run locally on my machine (http://127.0.0.1:9000/admin/def

[web2py] Re: plugin_wiki fails - missing ABOUT file

2011-08-06 Thread Gour-Gadadhara Dasa
On Sat, 6 Aug 2011 10:49:20 -0700 (PDT) Massimo Di Pierro wrote: > Looking at the path of the error. Something is wrong. I suspect you > installed the plugin as an application. Ahh...you're right. Excuse me for the noise - childhood illnesses. :-( Sincerely, Gour -- “In the material world, c

[web2py] Re: plugin_wiki fails - missing ABOUT file

2011-08-06 Thread Massimo Di Pierro
Looking at the path of the error. Something is wrong. I suspect you installed the plugin as an application. On Aug 6, 12:25 pm, Gour-Gadadhara Dasa wrote: > Hiya, > > I've tried to install plugin_wiki on web2py-1.98.2, but it fails: > >     Traceback (most recent call last): >       File "/usr/

[web2py] Re: bg-bg.py (Bulgarian translation)

2011-08-06 Thread Gour-Gadadhara Dasa
On Sat, 6 Aug 2011 10:11:17 -0700 (PDT) Massimo Di Pierro wrote: > Thank you Gour, > > create the translation file using admin and email it to me. OK. Thanks for the info. Sincerely, Gour -- “In the material world, conceptions of good and bad are all mental speculations…” (Sri Caitanya Maha

Re: [web2py] Re: mongoDBAdapter test ......

2011-08-06 Thread joseph simpson
It is my understanding that some people are interested but they do not have the time to create the adapter. May or may not have time to test but would put it on the priority list. Have fun On Fri, Aug 5, 2011 at 5:15 AM, Francisco Costa wrote: > On Aug 4, 7:05 pm, Massimo Di Pierro > wrote: >

[web2py] plugin_wiki fails - missing ABOUT file

2011-08-06 Thread Gour-Gadadhara Dasa
Hiya, I've tried to install plugin_wiki on web2py-1.98.2, but it fails: Traceback (most recent call last): File "/usr/home/gour/www/web2py/gluon/restricted.py", line 192, in restricted exec ccode in environment File "/usr/home/gour/www/web2py/applications/admin/controlle

[web2py] Re: bg-bg.py (Bulgarian translation)

2011-08-06 Thread Massimo Di Pierro
Thank you Gour, create the translation file using admin and email it to me. On Aug 6, 11:38 am, Gour-Gadadhara Dasa wrote: > On Tue, 24 Aug 2010 09:53:24 -0700 (PDT) > > mdipierro wrote: > > Please email to me as an attachment. Thanks. > > If I'd like to provide translation of web2py into my na

[web2py] Re: Pagination

2011-08-06 Thread Massimo Di Pierro
You can put anywhere you like. If it goes in a module, you need to import it. Because of the new custom import and current. This is no longer a problem. Any module imported by a model or controller can do from gluon import current, DIV, SQLHTML, etc. and get access to everything. current contains

[web2py] Nice web development infography

2011-08-06 Thread Albert Abril
Web2py mention as python framework ;) http://bit.ly/qf8I8E

[web2py] Re: The web2py grid/crud plugin you've always dreamed about! Options

2011-08-06 Thread peter
It is 1.98.2 On Aug 6, 5:28 pm, Bruno Rocha wrote: > What is your web2py version? > > The plugin works only in 1.97+ > > http://zerp.ly/rochacbruno > Em 06/08/2011 08:55, "peter" escreveu: > > > > > I have powergridapp working on my system, however when I added the > > powergrid plugin to my a

[web2py] Re: bg-bg.py (Bulgarian translation)

2011-08-06 Thread Gour-Gadadhara Dasa
On Tue, 24 Aug 2010 09:53:24 -0700 (PDT) mdipierro wrote: > Please email to me as an attachment. Thanks. If I'd like to provide translation of web2py into my native language, what is the recommended procedure to contribute? Sincerely, Gour -- “In the material world, conceptions of good and b

[web2py] Re: Pagination

2011-08-06 Thread pbreit
Where does the class go? In a module? I still don't fully understand "current". Is that an easy way for a module to have access to the whole current environment?

Re: [web2py] The web2py grid/crud plugin you've always dreamed about! Options

2011-08-06 Thread Bruno Rocha
What is your web2py version? The plugin works only in 1.97+ http://zerp.ly/rochacbruno Em 06/08/2011 08:55, "peter" escreveu: > I have powergridapp working on my system, however when I added the > powergrid plugin to my app I get > > No module named plugin_PowerGrid.PowerGrid > > Yet, the file o

[web2py] Re: Pagination

2011-08-06 Thread Massimo Di Pierro
You can do something like this: class Paginator(DIV): items_per_page = 10 records = 100 def limitby(self): from gluon import current page = self.page=int(current.request.vars.page or 0) return (self.items_per_page*page,self.items_per_page*(page +1))

[web2py] The web2py grid/crud plugin you've always dreamed about! Options

2011-08-06 Thread peter
I have powergridapp working on my system, however when I added the powergrid plugin to my app I get No module named plugin_PowerGrid.PowerGrid Yet, the file organisation seems to be the same. I have plugin_PowerGrid within my modules folder and PowerGrid.py within that folder. Any help appreciat

Re: [web2py] Pagination

2011-08-06 Thread Web2Py Freak
*This is the example in the book , how can i edit it to fit my table "db.blogpost" ?* db = DAL ('sqlite://primes.db') db.define_table('prime',Field ('value','integer')) def isprime(p):

Re: [web2py] Pagination

2011-08-06 Thread Bruno Rocha
db(db.posts.id>0).select(limitby=(0,10)) http://zerp.ly/rochacbruno Em 06/08/2011 05:00, "Web2Py Freak" escreveu: > Hey guys , > > Anyone Used Pagination before , i have a table named "blogpost" and i > want it to view every 10 post in a page , how can i do that ?? >

[web2py] Pagination

2011-08-06 Thread pbreit
Probably have to code it. There's an example in the book.

[web2py] Re: autodelete doesn't seem to work

2011-08-06 Thread weheh
Oops, I think I forgot to do a db.commit(). Now it seems to work OK.

[web2py] Pagination

2011-08-06 Thread Web2Py Freak
Hey guys , Anyone Used Pagination before , i have a table named "blogpost" and i want it to view every 10 post in a page , how can i do that ??