[web2py:19059] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
Massimo - you're awesome! This is much better On Sat, Apr 4, 2009 at 1:02 AM, mdipierro wrote: > > I re-posted a slightly better version. > > The new version work in this way: > > say you have an action like: > > def myform(): > form=SQLFORM(...) > if form.accepts(): >

[web2py:19058] Re: important about ajax forms

2009-04-03 Thread mdipierro
I re-posted a slightly better version. The new version work in this way: say you have an action like: def myform(): form=SQLFORM(...) if form.accepts(): # do something redirect(URL()); return dict(form=form) You can turn it into a partial by replacing

[web2py:19057] Re: important about ajax forms

2009-04-03 Thread ceej
I'm really liking this idea Massimo, I'm going to be using it in a project I'm about to start and grow on it :) Keeps using ajax very DRY. On Apr 3, 4:08 pm, mdipierro wrote: > There has been a lot of discussion in the past about forms that submit > via ajax and may or may not refresh the entir

[web2py:19056] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 10:33 PM, mdipierro wrote: > > Yarko most systems just use iframes. You can put anything you want > into an iframe. I'm not sure that's so, but regardless I think that misses the point (iframe is a dtd type, and can be the target of links on a page and so forth; my.msn.co

[web2py:19055] Re: important about ajax forms

2009-04-03 Thread mdipierro
Yarko most systems just use iframes. You can put anything you want into an iframe. The problem I am trying to solve is turning existing forms into ajax forms and do it in such a way that when the form has errors, it just modified itself without reloading the page. If the form submission succeeds

[web2py:19054] Re: web2py desktop / web app

2009-04-03 Thread mdipierro
I believe ceej has been working with web2py + titanium. Perhaps he can give us some advice. On Apr 3, 8:15 pm, ice9 wrote: > I have been reading and hearing a lot about taking web frameworks like > pylons to create a web app  that works on the desktop  and web.. The > one using pylons was using

[web2py:19053] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 9:03 PM, Yarko Tymciurak wrote: > > On Fri, Apr 3, 2009 at 8:58 PM, Yarko Tymciurak wrote: > >> On Fri, Apr 3, 2009 at 4:35 PM, Yarko Tymciurak wrote: >> >>> another way to state this: partials are language from one very (too) >>> narrow use case. >>> The general case is

[web2py:19052] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 8:58 PM, Yarko Tymciurak wrote: > On Fri, Apr 3, 2009 at 4:35 PM, Yarko Tymciurak wrote: > >> another way to state this: partials are language from one very (too) >> narrow use case. >> The general case is that page CONTAINERS manage output, and decay to one >> container

[web2py:19051] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 4:35 PM, Yarko Tymciurak wrote: > another way to state this: partials are language from one very (too) > narrow use case. > The general case is that page CONTAINERS manage output, and decay to one > container per page (or the partials sort of idea that were mentioned). > >

[web2py:19050] web2py desktop / web app

2009-04-03 Thread ice9
I have been reading and hearing a lot about taking web frameworks like pylons to create a web app that works on the desktop and web.. The one using pylons was using dabo which uses wxPython for the gui lib. I just think it would be very cool to do such a thing, alternatives are Titanium by appc

[web2py:19049] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-03 Thread seth
That was it! Best Regards, -Seth On Apr 3, 5:52 pm, mdipierro wrote: > can you try add > > db.commit() > > This is not necessary for normal controllers but perhaps it is > necessary for Cron. > @Achipa, could you clarify this aspect of cron? > > Massimo > > On Apr 3, 7:45 pm, seth wrote: > > >

[web2py:19048] Re: Input type button

2009-04-03 Thread mdipierro
I am not sure I fully understand the question since this is not a web2py specific questions. If a page has a button: click me when you click it will call the action sayhi(), For example def sayhi(): return dict(message="hello") Normally you use inside a The form is submitted to the acti

[web2py:19047] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-03 Thread mdipierro
can you try add db.commit() This is not necessary for normal controllers but perhaps it is necessary for Cron. @Achipa, could you clarify this aspect of cron? Massimo On Apr 3, 7:45 pm, seth wrote: > Hi Massimo, > > Thanks for the quick response. I've since tried the same on another > machine

[web2py:19046] Re: WARNING:root:unable to import dbhash (only from external cron)

2009-04-03 Thread seth
Hi Massimo, Thanks for the quick response. I've since tried the same on another machine (this time ubuntu linux) and am having the same trouble, this time there is no dbhash error. In case anyone wants to verify my troubles, here are the relevant parts... [web2py crontab] /applications/cronwork

[web2py:19045] Re: Input type button

2009-04-03 Thread r...@devshell.org
I am trying to just understand where web2py stores the request data, i.e. for various inputs and for buttons, how will I tell which button/ input is being activated by the user. I am making a simple calculator, and I want some buttons to be type="button", not type "submit". However, once they are

[web2py:19044] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 2:35 PM, Yarko Tymciurak wrote: > You can use google maps - > An example output: > > https://us.pycon.org/2009/register/default/maps > > The code to accomplish (collect coordinates): > > def maps(): in > http://bazaar.launchpad.net/~yarkot1/web2conf/pycon2009site/annotate

[web2py:19043] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
another way to state this: partials are language from one very (too) narrow use case. The general case is that page CONTAINERS manage output, and decay to one container per page (or the partials sort of idea that were mentioned). Now - controller logic is just engineering logic - implementation o

[web2py:19042] Re: important about ajax forms

2009-04-03 Thread Yarko Tymciurak
I think this is not structured _enough_. Looking at what has already been done in this area (see jsr portlets; I do not remember how dotnetnuke does the same with it's "page components" - but that is definitely worth analyzing). What we need is some general way that a def index(): return someth

[web2py:19041] Re: MSSQL migrate error

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 3:59 PM, mdipierro wrote: > > I do not see a problem with this but is GO a mssql only keyword? In MSSQL - "GO" runs the accumulated batch of lines (it's like "enter"). The problem is, I think, that you cannot depend on the order of statement exectution when "GO" execute

[web2py:19040] important about ajax forms

2009-04-03 Thread mdipierro
There has been a lot of discussion in the past about forms that submit via ajax and may or may not refresh the entire page. It is also useful to be able to break html pages into "modules" or "plugins" or "components" each with its own model, view, controller in such a way that they communicate bot

[web2py:19039] Re: MSSQL migrate error

2009-04-03 Thread mdipierro
I do not see a problem with this but is GO a mssql only keyword? On Apr 3, 3:29 pm, DenesL wrote: > Changing a MSSQL table definition with migrate=True in the models > produces this error ('escalated' is the original field name in my > table): > > ProgrammingError: ('42S22', "[42S22] [Microsoft]

[web2py:19038] Re: Input type button

2009-04-03 Thread mdipierro
normally what you do is: if form.accepts(request.vars): redirect(URL(r=request,f='index')) web2py uses postbacks. You do not have to but it makes your life much easier. Or are you trying to submit a web2py form to a non-web2py action? Massimo On Apr 3, 1:48 pm, "r...@devshell.org" wrote: > Hi

[web2py:19037] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread mdipierro
http://bazaar.launchpad.net/%7Emdipierro/web2conf/devel/annotate/head%3A/views/default/maps.html Please cod not call me Prof. makes me feel old. BTW. Are you one of my students? Massimo On Apr 3, 1:35 pm, dbb wrote: > We know we can get the longtitude and latitude of an address using > web2py,

[web2py:19036] Re: changed file name in file upload

2009-04-03 Thread bsnipes
> Is it possible to capture the original filename to the table and then > send it as back to the name back to the client when the client clicks > on a link to download the file? Never mind... found some more info in another thread on it. http://groups.google.com/group/web2py/browse_thread/threa

[web2py:19035] MSSQL migrate error

2009-04-03 Thread DenesL
Changing a MSSQL table definition with migrate=True in the models produces this error ('escalated' is the original field name in my table): ProgrammingError: ('42S22', "[42S22] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'escalated__tmp'. (207) (SQLExecDirectW)") I traced

[web2py:19034] Re: changed file name in file upload

2009-04-03 Thread bsnipes
On Feb 9, 3:00 pm, mdipierro wrote: > For 3 reasons: > 1) avoid directory traversal attacks > 2) avoid conflicts (two files uploaded with same name) > 3) be able to identify which table and which record afilebelongs to > from thefilename itself. > > Massimo Is it possible to capture the original

[web2py:19033] Input type button

2009-04-03 Thread r...@devshell.org
Hi there, I was wondering about the button input type. I know it is recommended to use a input submit type, however, if one were wanting to use a button, how could I have web2py forward to another page with it? ie. <--- I want that to redirect to register/index.html in the VIEW. Also, I found

[web2py:19032] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread Yarko Tymciurak
You can use google maps - An example output: https://us.pycon.org/2009/register/default/maps The code to accomplish (collect coordinates): def maps(): in http://bazaar.launchpad.net/~yarkot1/web2conf/pycon2009site/annotate/head:/applications/register/controllers/default.py and: http://bazaar

[web2py:19031] Re: DAL problem

2009-04-03 Thread TheDude
Massimo, makes sense now that you've explained it a bit. Thanks. :) On Apr 3, 1:40 pm, mdipierro wrote: > There is a logic and these two > > {{=board._extra['COUNT(mb_posts2.id)']}} > {{=board._extra[mb_posts2.id.count()]}} > should be equivalent, in fact {{=mb_posts2.id.count()}} should be > 'C

[web2py:19030] Re: Error message css style

2009-04-03 Thread Vidul Petrov
return DIV.xml(self) + TABLE(TR(TD(self.errors[name], _class='error' , errors=None, _id='%s__error' % name))).xml() and in the css file: td.error { min-width: ... } I also tried with SPAN (much better effect IMHO), but (of course) IE didn't make the right alignment (in contr

[web2py:19029] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread dbb
We know we can get the longtitude and latitude of an address using web2py, what we need here is to make these points map to x,y coordinate and map the points on google map. Can Prof.Massimo directus how to convert lo,la to x,y, and map the points ( x,y) on google map in web2py world. Best regards

[web2py:19028] Re: Writing a Book

2009-04-03 Thread Álvaro Justen [Turicas]
On Fri, Apr 3, 2009 at 11:26 AM, TheDude wrote: > Overall, I think I'll be writing a lot of versions of the book online > and keep improving on it, and then eventually publishing it once I > feel the book has matured enough. > > Thanks for all of your help guys. :) Send news to us. :-) -- Álv

[web2py:19027] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread AchipA
Geodjango seemed pretty deeply rooted in django (in terms of the models/ORM) so my impression was it would be more of a rewrite than a port. The turbogears solution seemed more of an 'addon' which just links other GIS components like openlayers/mapfish for a more convenient use from within TG, but

[web2py:19026] Re: DAL problem

2009-04-03 Thread mdipierro
There is a logic and these two {{=board._extra['COUNT(mb_posts2.id)']}} {{=board._extra[mb_posts2.id.count()]}} should be equivalent, in fact {{=mb_posts2.id.count()}} should be 'COUNT(mb_posts2.id)'. The rationale is that rows=db(...).select (table.field,table.field.aggregate()) table field go

[web2py:19025] Re: T3 errors

2009-04-03 Thread dbb
Thank you Prof. I have been using mysql with web2py many times, just slipped from my finger. Sory for taking your precious time for this kind of issue.I have been saving my life line for big problem. I hope this one will notaffect my life line. Best Regards: Debebe Asefa On Apr 3, 8:56 am, dbb

[web2py:19024] Re: DAL problem

2009-04-03 Thread TheDude
THat didn't work but.. {{=board._extra.keys()}} brings up ['COUNT(mb_posts.id)', 'COUNT (mb_posts2.id)'] So I did {{=board._extra['COUNT(mb_posts2.id)']}} and it works! Now, the only problem I have with this, is that it doesn't make to much logical sense to do things this way (it doesn't seem l

[web2py:19023] Re: Error message css style

2009-04-03 Thread Yarko Tymciurak
On Fri, Apr 3, 2009 at 10:36 AM, Vidul Petrov wrote: > > Finally managed to change the error messages format - > file: "gluon/html.py" > class:INPUT > method: xml which uses div.errors, so were you able to change format in static/style.css? Or did you do something else? Just wondering... >

[web2py:19022] Re: DAL problem

2009-04-03 Thread mdipierro
{{=board._extra[mb_posts2.id.count()]}} ? On Apr 3, 10:01 am, TheDude wrote: > RIght tried those already... > .keys() brings up ['update_record', 'mb_posts', 'description', 'id', > 'name'] > board._extra = no xml error > > I tried listing keys() and dir() mb_posts (see if it was somehow > placed

[web2py:19021] Re: Error message css style

2009-04-03 Thread Vidul Petrov
Finally managed to change the error messages format - file: "gluon/html.py" class:INPUT method: xml On Apr 3, 5:33 pm, Vidul Petrov wrote: > Hi, > > I cannot find a way to resize the error message, the recaptcha is > 500px and the other input fields are only 210px, so the error message > becomes

[web2py:19020] Re: DAL problem

2009-04-03 Thread TheDude
RIght tried those already... .keys() brings up ['update_record', 'mb_posts', 'description', 'id', 'name'] board._extra = no xml error I tried listing keys() and dir() mb_posts (see if it was somehow placed in there but it isn't). However, {{=query}} brings this... mb_boards.idmb_boards.name

[web2py:19019] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread mdipierro
You want to look into this and talk to authors: http://trac.sahanapy.org/browser/models/_gis.py http://trac.sahanapy.org/browser/controllers/gis.py Massimo On Apr 3, 6:06 am, Timmie wrote: > Dear web2py users/developers, > I am mostly using python for scientific data processing. > I would lik

[web2py:19018] Re: using web2py for Geo / GIS stuff

2009-04-03 Thread Fran
On Apr 3, 1:06 pm, Timmie wrote: > * Is there someone working on a site with Geographical data or GIS > capabilities Yes, but not generalised: http://trac.sahanapy.org/wiki/BluePrintGeographicInformationSystems Am keen to collaborate where possible :) F --~--~-~--~~~---

[web2py:19017] Re: appengine error

2009-04-03 Thread mdipierro
Did you edit the app.yaml file? It does not see to be uploading the VERSION file. On Apr 3, 8:24 am, Joseph Jude wrote: > Hi all, > I'm not sure if anyone of you got this error while running on > appengine (locally, using appengine launcher). > > : [Errno 13] file not accessible > > going throug

[web2py:19016] Re: T3 errors

2009-04-03 Thread mdipierro
The URI string in db=SQLDB("mysql://root:localhost/db") # WRONG is wrong. Should be db=SQLDB("mysql://root:passw...@localhost/db") # RIGHT You can find examples on http://www.web2py.com/examples/default/dal On Apr 3, 7:56 am, dbb wrote: > To Prof.  Massimo : I have errors related to the d

[web2py:19015] Re: DAL problem

2009-04-03 Thread mdipierro
try: {{=board.mb_boards.keys()}} {{=board._extra}} On Apr 2, 5:20 pm, TheDude wrote: > SQL Works! However... > > {{=board.mb_boards.keys()}} > brings up: > ['update_record', 'mb_posts', 'description', 'id', 'name'] > > As you can see, no mb_posts2 (mb_posts does not contain mb_posts2 > either).

[web2py:19014] Error message css style

2009-04-03 Thread Vidul Petrov
Hi, I cannot find a way to resize the error message, the recaptcha is 500px and the other input fields are only 210px, so the error message becomes 500px and I want it to be 210px for all but recaptcha. Any ideas? Thank you. --~--~-~--~~~---~--~~ You received this

[web2py:19013] using web2py for Geo / GIS stuff

2009-04-03 Thread Timmie
Dear web2py users/developers, I am mostly using python for scientific data processing. I would like to take my scripts to an internet/intranet site for a larger audience to benefit. Therefore I am evaluating python web frameworks. So far, the web2py approach is apealing most to me. Clean and easy

[web2py:19012] Re: Writing a Book

2009-04-03 Thread TheDude
In response to cadrentes and to elaborate on the project more... The book will be made for people who don't have a lot of time on their hands and would like to get their hands "dirty" with Web2Py as fast as possible. Most of the book will contain links to resources and guides, including videos, r

[web2py:19011] Re: Writing a Book

2009-04-03 Thread cadrentes
I'm 38. I've been running Linux for a few years but I have no programming experience ecxept; copy and past some VBA in Excel, a few shell scripts, and a brief attempt at figuring out CakePHP. I've had a copy of Massimo's book for about a month and it is great! I've already put together a produc

[web2py:19010] appengine error

2009-04-03 Thread Joseph Jude
Hi all, I'm not sure if anyone of you got this error while running on appengine (locally, using appengine launcher). : [Errno 13] file not accessible going through the err pg, I see this at the end. web2py_path = os.environ.get('web2py_path', os.getcwd()) web2py_version = open(os.path.joi

[web2py:19009] T3 errors

2009-04-03 Thread dbb
To Prof. Massimo : I have errors related to the database used in T3, I used mysql, then I get errors. The trace is pasted below. -- Massimo, my ambition is to have a T3 pages which can connect to different databases in the same applications. My pressing question now is , does T3 connect to other

[web2py:19008] Re: DAL problem

2009-04-03 Thread TheDude
So, any suggestions? On Apr 2, 6:42 pm, TheDude wrote: > Sorry, it's in my views :) > > {{extend 'layout.html'}} > Message Boards > class="data"> > > Board > Threads > Posts > Last Topic > > {{for board in query:}} > > {{=A(board.mb_boards.name, _href=URL(r=request, f='view', > args=board.mb

[web2py:19007] Re: Save a view as a file ?

2009-04-03 Thread JC11
Super, thanks. This works but with 'write' rather than 'save'. I am getting more and more impressed with web2py as I use it more. JC On Apr 2, 11:39 pm, mdipierro wrote: > open(filename,'wb').save(response.render(view_filename,dict(a=3))) > > On Apr 2, 5:22 pm, JC11 wrote: > > > Sorry I did no

[web2py:19006] Re: Writing a Book

2009-04-03 Thread LordMax
HI to all On 2 Apr, 17:53, Álvaro Justen [Turicas] wrote: > > Nice! I prefer the option "long in-depth book". A quick-guide already Me too --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" grou