[web2py] Re: crud + custom form broken?

2010-08-03 Thread Rob
Duh... thanks a lot Thadeus! I'm glad the people in this group are as helpful and understanding as they are :) On Aug 3, 9:10 pm, Thadeus Burgess wrote: > crud.select is not a form. it is an SQLTABLE. You probably ment, form > = crud.create(db.Dinners), or form = crud.update(db.Dinners, id) > >

Re: [web2py] Re: cube2py news

2010-08-03 Thread Bruno Rocha
I found a trick to do that as #anchor marked with [[anything]] is rendered as ( which I am not sure if it is a good html pratice ) BTW, I solved my problem on white spaces with CSS [[br]] = I want [[brbr]] = I want the CSS #br{ height:15px; line-height:15px; display:block; } #brbr{ height

Re: [web2py] Re: plugin_wiki suggestions

2010-08-03 Thread Bruno Rocha
Useful suggestion: markmin currently does not allow the creation of references to links, this is very useful when the written material might be used for printing as well. thus present a list of links referenced in the footnote. with markdown, we can do: This is [an example] [id] reference-style l

Re: [web2py] crud + custom form broken?

2010-08-03 Thread Thadeus Burgess
crud.select is not a form. it is an SQLTABLE. You probably ment, form = crud.create(db.Dinners), or form = crud.update(db.Dinners, id) -- Thadeus On Tue, Aug 3, 2010 at 10:16 PM, Rob wrote: > web2py Version 1.81.5 (2010-07-22 23:56:21) > > def index(): >    rows = db().select(db.Dinners.ALL)

[web2py] crud + custom form broken?

2010-08-03 Thread Rob
web2py Version 1.81.5 (2010-07-22 23:56:21) def index(): rows = db().select(db.Dinners.ALL) form = crud.select(db.Dinners) return dict(form=form, rows=rows) default/index.html: {{extend 'layout.html'}} {{=form.custom.begin}} {{=form.custom.end}} Results in: Traceback (most recent ca

Re: [web2py] accessing the db from a module

2010-08-03 Thread Thadeus Burgess
The only way is if you pass the dal instance as an argument to your function calls. do_something(db) a_class = MyClass(db, request, response) -- Thadeus On Tue, Aug 3, 2010 at 6:04 PM, sethford wrote: > Is there is a way to access the db from a module? I know you can > import the DAL from

[web2py] accessing the db from a module

2010-08-03 Thread sethford
Is there is a way to access the db from a module? I know you can import the DAL from looking at: http://groups.google.com/group/web2py/browse_thread/thread/a78a04016d0dd737/d0e4792976294ec6?show_docid=d0e4792976294ec6 but it appears this only works to create a new db altogether and I would like t

Re: [web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread Jonathan Lundell
On Aug 3, 2010, at 7:48 AM, Jonathan Lundell wrote: > On Aug 3, 2010, at 5:33 AM, Niphlod wrote: > >> +1 for this method, is pretty standard in other frameworks too. >> Also, according to http://www.w3.org/TR/XMLHttpRequest/#send , the >> Accept header must be set as '*/*'. >> >> (and I think th

[web2py] Best practice for removing link to active page from menu?

2010-08-03 Thread mwolfe02
I wrote this simple website using Django (http:// www.heberlings.com/). As part of the navigation, I wanted to turn off the link for the currently active page. If you visit the site and click on a couple of the menu items on the left side of the page, you will see what I mean. To implement this

[web2py] Is it possible to close the source of an app made with plugin_wiki?

2010-08-03 Thread Bruno Rocha
I saw this post - > "So ... you want to make and sell a closed source windows exe web2py app? Http://bit.ly/aNWRgi" And I was thinking, if it is possible to package an application developed with plugin_wiki and distribute closed source? I am not sure how this works internally, but since the plugi

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Bruno Rocha
'Bad English'*2 ... I mean my english is worse than yours. your method get_last_post_with_search() can be replaces with the solution using .find() posted here, now we have to find ways to port use the not operators ("!=" and "~") and mixed queries (db.image.id==id)&(db.image.title==''). Image

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Bruno Rocha
'Bad English '*2 2010/8/3 Martin.Mulone > First my appologies for my bad english, spanish is my primary > language. I was reading about GAE > http://web2py.com/AlterEgo/default/show/248 > . Yes i have to transform many queries :P. I have many ideas, many of > them i dont know how to implement li

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Bruno Rocha
Thanks Massimo! I am learning a lot about the way you use lambda: in web2py. now my search is really faster. is there any chance to do: myrows = db(..).select().GAELIKE('string') or myrows = db(...).select().like(string) or may be myrows = GAELIKE(db.().select(),'string') p

[web2py] Web2py Application Exhibition -- Winners!

2010-08-03 Thread NetAdmin
Hello All, The winners of the Web2py Application Exhibition have been e-mailed, and I'm waiting for their replies before posting the results. Mr.NetAdmin

[web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread mdipierro
No apologies. Your work is excellent. On Aug 3, 1:48 pm, "Martin.Mulone" wrote: > First my appologies for my bad english, spanish is my primary > language. I was reading about GAEhttp://web2py.com/AlterEgo/default/show/248 > . Yes i have to transform many queries :P. I have many ideas, many of >

[web2py] Re: Custom dynamic form submission

2010-08-03 Thread mdipierro
I suggest you use this: http://muiomuio.com/web-design/add-remove-items-with-jquery and here is a demo: http://muiomuio.com/tutorials/jquery/add-remove/ Massimo On Aug 3, 1:19 pm, cogarg wrote: > Hello, > > I just starting using web2py and i am a little bit lost, since my > knowledge of > html/

[web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Martin.Mulone
First my appologies for my bad english, spanish is my primary language. I was reading about GAE http://web2py.com/AlterEgo/default/show/248 . Yes i have to transform many queries :P. I have many ideas, many of them i dont know how to implement like layouts system, layouts over layouts, i dont think

[web2py] Custom dynamic form submission

2010-08-03 Thread cogarg
Hello, I just starting using web2py and i am a little bit lost, since my knowledge of html/css/js/python are mediocre at best. What i wanted to create is a form with some standard fields and an option to add more fields(single button, adds 6 fields - an entire db record). So far, so good, the ht

[web2py] Re: Ladies and Gentelmen... the web2py book is online

2010-08-03 Thread mdipierro
I have been working on the apps. I apologize. I am about to fix it soon. Massimo On Aug 3, 12:43 pm, "Zoom.Quiet" wrote: > On Fri, Feb 12, 2010 at 09:30, mdipierro wrote: > >http://web2py.com/book > > > This is only for testing purposes. > > Please try get an account and send me some feedback.

Re: [web2py] Ladies and Gentelmen... the web2py book is online

2010-08-03 Thread Zoom.Quiet
On Fri, Feb 12, 2010 at 09:30, mdipierro wrote: > http://web2py.com/book > > This is only for testing purposes. > Please try get an account and send me some feedback. > can not usage any account login Invalid argument: token_url domain not in whitelist i try google/Yahoo/openID > You can try

Re: [web2py] Ladies and Gentelmen... the web2py book is online

2010-08-03 Thread Mr admin
I can't login, but here is a change for IS_STRONG current * min is minimum length of the value * special is the minimum number of required special characters * is the minimum number of upper case characters = suggested changes =

[web2py] Re: Ladies and Gentelmen... the web2py book is online

2010-08-03 Thread mwolfe02
I'm having the same issue logging in. Any resolution/workaround? Thanks, Mike On Jul 31, 5:49 am, LordMax wrote: > HI > > I'll see some imagesnotrendered. > > for example onhttp://web2py.com/book/default/chapter/01#Model-View-Controller > > On source page they are linked like: > /book2/static/b

[web2py] Re: How does cache.ram work on wsgi mode?

2010-08-03 Thread mdipierro
It depends on how apache is configured. If you are serving two different ports it is possible it is creating two processes. In this case you have one cache.ram per process. On Aug 3, 11:19 am, Iceberg wrote: > On Aug 3, 7:39 pm, iceb...@21cn.com wrote: > > > > > Well, actually I am not sure wheth

[web2py] Re: How does cache.ram work on wsgi mode?

2010-08-03 Thread Iceberg
On Aug 3, 7:39 pm, iceb...@21cn.com wrote: > Well, actually I am not sure whether is a wsgi problem or a webfaction > problem. Anyway I just observe TWO separated instances of cache.ram inside > ONE web2py instance. How could this be? > > Detail description. > > One of my web2py app's action is t

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Phyo Arkar
Another necessary app: Currently , there are so few python hosting providers especially for shared hosting. We need a Hosting Control panel for web2py. Even Web2py admin modifcation with different admins for each projects should work. But there may be security concern as web2py allows full pytho

[web2py] GAETest or NoseGAE

2010-08-03 Thread PanosJee
Hi guys, I want to run some tests for my app (runs on gae) but i cannot find much. I am investigating the use of http://code.google.com/p/gaeunit/ Reading the wiki it seems it is suited to WebApp but we could modify it a bit to work with web2py. What do you think?

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Phyo Arkar
Ok Back to Topic Instant Press , looks good With some work , that one could become a standard Blog for Web2py . mulone martin , you should be branding it . Get a domain for it as a dedicate site , and to some of us who want to contribute , assign task at google code. Prof Massimo , your reddit c

[web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread mdipierro
This code is equivalent to yours, also runs on GAE, and it is faster: @staticmethod def searchPages(string=None,nfmessage='Nothing found with %s'): pages = db(db.plugin_wiki_page.id>0).select().find(lambda row: \ string and (string in row.slug or string in row.bod

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
And I did send you the markmin2latex.py the book chap13 I posted is pure markmin2latex output without any manual edit. On Aug 3, 7:46 am, Bruno Rocha wrote: > Thanks, Massimo > > I have no doubt, I will keep the markmin as markup language for my site, I > did a comparison and I write much faster

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread mdipierro
OK, in trunk request.ajax can be true or false On Aug 3, 6:20 am, David Marko wrote: > This simple function can make a detection: > > def isAjax(): >     if request.env.http_x_requested_with==None: >         return False > >     if > request.env.http_x_requested_with.lower()=='XMLHttpRequest'.lo

[web2py] Re: Can LOAD trap links too?

2010-08-03 Thread mdipierro
You can modify web2py_ajax.html and replace function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i) { var form=jQuery(this); if(! form.hasClass('no_trap')) form.submit(function(obj) { jQuery('.flash').hide().html(''); web2py_ajax_page('post

[web2py] Re: cool pyjamas & web2py app on GAE :)

2010-08-03 Thread mdipierro
http://www.reddit.com/r/programming/comments/cwve1/minesweeper/ On Aug 3, 8:07 am, Oleg wrote: > http://pymines.appspot.com/

[web2py] Re: open id, rpx auth: local rpxaccount.py modif

2010-08-03 Thread mdipierro
thanks, uploading fix On Aug 3, 7:09 am, molhokwai wrote: > Hello, > > Just to share this modification in the > gluon/contrib/login_methods/rpxaccount.py file that fixes an issue due to > the fact that providers eventually send nothing for specific keys (ex: > Facebook does not send the email key

Re: [web2py] Re: plugin_wiki suggestions

2010-08-03 Thread Bruno Rocha
Thanks, Massimo I have no doubt, I will keep the markmin as markup language for my site, I did a comparison and I write much faster with markmin than with LaTeX, markdown, html Or Another. I'll do everything possible to contribute on issues that I have knowledge. if I get some success will send a

[web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread JorgeRpo
+1

Re: [web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread Jonathan Lundell
On Aug 3, 2010, at 5:33 AM, Niphlod wrote: > +1 for this method, is pretty standard in other frameworks too. > Also, according to http://www.w3.org/TR/XMLHttpRequest/#send , the > Accept header must be set as '*/*'. > > (and I think that there is one too much "lower()"), : > > ... > if request.e

[web2py] Re: ARTICLE: The good and bad about web2py

2010-08-03 Thread Iceberg
On Aug 2, 4:56 am, Jason Brower wrote: > Annoying as i can't view the errors without copying them locally first off > the web server and reading them from my personal computer. You can, just configure properly the web2py admin interface on your production site. Even you did not setup or don't

[web2py] Can LOAD trap links too?

2010-08-03 Thread mr.freeze
If I click a link in a component that has ajax=True, it takes me to a bare page with only the component. Can we add the option to trap links too?

[web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread aure
+1 On Aug 2, 12:16 pm, Phyo Arkar wrote: > Web2py is Great, Greatest framework that i had ever tried and stick onto it. > > But what it is lacking is publicity and lack of KILLER web-apps like those > Made PHP most popular web-development platform. > Here are some , what that had made PHP Popular

[web2py] cool pyjamas & web2py app on GAE :)

2010-08-03 Thread Oleg
http://pymines.appspot.com/

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread Niphlod
+1 for this method, is pretty standard in other frameworks too. Also, according to http://www.w3.org/TR/XMLHttpRequest/#send , the Accept header must be set as '*/*'. (and I think that there is one too much "lower()"), : ... if request.env.http_x_requested_with.lower()=='xmlhttprequest': ...

[web2py] open id, rpx auth: local rpxaccount.py modif

2010-08-03 Thread molhokwai
Hello, Just to share this modification in the gluon/contrib/login_methods/rpxaccount.py file that fixes an issue due to the fact that providers eventually send nothing for specific keys (ex: Facebook does not send the email key by default). The code (starting @line 56): --

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread mdipierro
interesting. On Aug 3, 6:20 am, David Marko wrote: > This simple function can make a detection: > > def isAjax(): >     if request.env.http_x_requested_with==None: >         return False > >     if > request.env.http_x_requested_with.lower()=='XMLHttpRequest'.lower(): >         return True >    

[web2py] Re: markmin, t2, t3, cube9 etc. (important update)

2010-08-03 Thread mdipierro
why? On Aug 3, 6:07 am, Timmie wrote: > > This has been in trunk for some time: > > > >>> from gluon.html import markmin_serializer > > >>> html='Header > >>> href="http://google.com";>linkbold' > > >>> TAG(html).flatten(markmin_serializer) > > > '#Header\n\n[[linkhttp://google.com]]**bold**\n\n'

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
I just did On Aug 3, 6:06 am, Timmie wrote: > Hello, > where can we see these changes? > > Do you intend to upload? > > Thanks.

[web2py] How does cache.ram work on wsgi mode?

2010-08-03 Thread iceberg
Well, actually I am not sure whether is a wsgi problem or a webfaction problem. Anyway I just observe TWO separated instances of cache.ram inside ONE web2py instance. How could this be? Detail description. One of my web2py app's action is to refresh cache.ram and then log the result.

[web2py] Re: uft 8

2010-08-03 Thread max
yes. it shows incorrectly in the browser. On Aug 2, 7:13 pm, Jason Brower wrote: > by false do you mean incorrectly in the webbrowser? > The area that is printing this is python not the html though you should > have it there. :) > I am not sure where it is set python side, but I do know my finnis

[web2py] Re: uft 8

2010-08-03 Thread max
yes. it shows incorrectly in the browser. On Aug 2, 7:13 pm, Jason Brower wrote: > by false do you mean incorrectly in the webbrowser? > The area that is printing this is python not the html though you should > have it there. :) > I am not sure where it is set python side, but I do know my finnis

[web2py] Re: uft 8

2010-08-03 Thread max
yes. it shows incorrectly in the browser. On Aug 2, 7:13 pm, Jason Brower wrote: > by false do you mean incorrectly in the webbrowser? > The area that is printing this is python not the html though you should > have it there. :) > I am not sure where it is set python side, but I do know my finnis

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread David Marko
This simple function can make a detection: def isAjax(): if request.env.http_x_requested_with==None: return False if request.env.http_x_requested_with.lower()=='XMLHttpRequest'.lower(): return True else: return False This could be a part of web2py core. David

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread szabba
On 3 Sie, 12:43, David Marko wrote: > I dont use LOAD, I simply call controller function from browser using > jQUERY $("#ID").load("URL to controller function") and in controller i > have to detect this ajax call You could use a query or path argument - just replace "/a/c/f" with "/a/c/f?ajax=tru

[web2py] Re: markmin, t2, t3, cube9 etc. (important update)

2010-08-03 Thread Timmie
> This has been in trunk for some time: > > >>> from gluon.html import markmin_serializer > >>> html='Header >>> href="http://google.com";>linkbold' > >>> TAG(html).flatten(markmin_serializer) > > '#Header\n\n[[linkhttp://google.com]]**bold**\n\n' > > You can use it to convert markdown syntax: > >

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread Timmie
Hello, where can we see these changes? Do you intend to upload? Thanks.

Re: [web2py] Re: code organization

2010-08-03 Thread Miguel Lopes
Iceberg, Thank you. Maybe I didn't explain what I wanted well, but you understood very well! Actually the solution is so simple it is embarrassing :-) Miguel On Tue, Aug 3, 2010 at 9:51 AM, Iceberg wrote: > Don't what you really want. In short, modules organize your functional > code, but you

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread mdipierro
I do not think you can. On Aug 3, 5:43 am, David Marko wrote: > I dont use LOAD, I simply call controller function from browser using > jQUERY $("#ID").load("URL to controller function") and in controller i > have to detect this ajax call > > David > > On 3 srp, 12:18, mdipierro wrote: > > > If

Re: [web2py] Re: Getting Eclipse / Pydev running

2010-08-03 Thread Miguel Lopes
On Tue, Aug 3, 2010 at 2:41 AM, pabloest wrote: > Thank you for the extended description. > This is almost exactly what I had been following. You welcome. Interesting to know you came up with a similar solution. > I had skipped the > arguments partially because I think Eclipse is not taking t

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread David Marko
I dont use LOAD, I simply call controller function from browser using jQUERY $("#ID").load("URL to controller function") and in controller i have to detect this ajax call David On 3 srp, 12:18, mdipierro wrote: > If it is done by the LOAD() then there should be a > > request.env.http_web2py_

[web2py] Re: How to detect in controller that request is via AJAX?

2010-08-03 Thread mdipierro
If it is done by the LOAD() then there should be a request.env.http_web2py_component_location != None Massimo On Aug 3, 5:00 am, David Marko wrote: > How to detect in controller that request is via AJAX? > > David

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
I never though somebody sould have more than 1000 revisions. Let's think about a good solution. The one you propose may be ok. On Aug 2, 3:54 pm, Bruno Rocha wrote: > - Page History > page history does not works on > GAE,http://web2pybrasil.appspot.com/init/plugin_wiki/page_history/home Fails >

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
I am not convinced this is a good idea. On Aug 2, 2:11 pm, Bruno Rocha wrote: > Another suggestion: > > should be the page.title field of plugin_wiki_page just > including response.title = page.title to page controller > > def page(): >     """ >     shows a page >     """ >     slug = request.a

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
fixed too. This was a markmin bug. On Aug 2, 8:23 am, Bruno Rocha wrote: > Another BUG in markmin render > > paragraph with **bold**, ''italic'' and ``code``.but: > > **text** renders as text > > **text:** renders as **text:** > > the same happens if we put any mark, point or accent as the la

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
`` name: comment table: [page] record_id: 1 ``:comment not sure this is a good idea but for now it should work. On Aug 1, 9:33 am, rochacbruno wrote: > I mean that THISPAGE should be a shortcut to {{=request.args(0)}} > > THISPAGE =  '{{=request.args(0)}}' > > " > name: comments > table: THISPAG

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
Done. please check it. On Aug 1, 2:03 am, Bruno Rocha wrote: > One more suggestion for today. > > It will be great to create new pages from "template", as creating a template > page with standard texts, widgets and other stuff, we have any way to > duplicate that page. > > actually just creating

[web2py] Re: plugin_wiki suggestions

2010-08-03 Thread mdipierro
> -* **Comments Widget* > I noticed that the comments widget is restricted to logged in users, the > code that generates the widget has requires_login (), this is great for > protecting users not logged in to write. FIXED > -* Searches with crud.search and jqgrid on GAE* > I got error using crud.

[web2py] How to detect in controller that request is via AJAX?

2010-08-03 Thread David Marko
How to detect in controller that request is via AJAX? David

Re: [web2py] Re: Getting Eclipse / Pydev running

2010-08-03 Thread Phyo Arkar
Import web2py directly from mercurial repo. For me , THis work flawlessly www.web2pyslices.com/main/slices/take_slice/2 all completions , debugging works. just paste your application inside it . On Tue, Aug 3, 2010 at 8:11 AM, pabloest wrot

[web2py] Re: JSON from rows

2010-08-03 Thread PanosJee
Well .json is what i was doing but rows.as_list() and row.as_dict() will do the trick ;-) On Aug 1, 11:56 pm, PanosJee wrote: > thanx massimo > as for question one i think i use action.jsonbut i ll dig a little > bit deeper into that > > On Aug 1, 4:40 pm, mdipierro wrote: > > > > > On Aug 1, 4:

[web2py] Re: code organization

2010-08-03 Thread Iceberg
Don't what you really want. In short, modules organize your functional code, but you still need to "expose" them in your controller. # In controllers/default.py def index(): return {'': DIV( LOAD(url=URL(r=request, f='foo.load')) )} def foo(): return {'': local_import('my_module').my_func(

[web2py] Re: markmin, t2, t3, cube9 etc. (important update)

2010-08-03 Thread mdipierro
and the markitup js that ships with plugin_wiki has been modified to support markmin too. On Aug 3, 3:20 am, mdipierro wrote: > This has been in trunk for some time: > > >>> from gluon.html import markmin_serializer > >>> html='Header >>> href="http://google.com";>linkbold' > >>> TAG(html).flatte

[web2py] Re: markmin, t2, t3, cube9 etc. (important update)

2010-08-03 Thread mdipierro
This has been in trunk for some time: >>> from gluon.html import markmin_serializer >>> html='Header>> href="http://google.com";>linkbold' >>> TAG(html).flatten(markmin_serializer) '#Header\n\n[[link http://google.com]]**bold**\n\n' You can use it to convert markdown syntax: >>> from gluon.contr

[web2py] Re: Chapter 13: components and plugins

2010-08-03 Thread mdipierro
trunk. On Aug 2, 7:07 pm, Bruno Rocha wrote: > The book is based on a specific version? are you using 1.81.5 or trunk? > > 2010/8/2 mdipierro > > > > > Thank you Bruno, > > > OK. I would like to have the images as tiff in actual size in pixels. > > Scale the window so that the default layout fit