Re: [web2py] Re: xml advise

2010-11-29 Thread Johann Spies
On 30 November 2010 09:30, mdipierro wrote: > Mind that web2py has built-in soap implementation > > web2py/gluon/contrib/pysimplesoap/ > > and you can create services with > > @service.soap(...) > def f(a,b): return a+b > > Mariano is the expert on this. > > Thanks. At this stage I am only inter

[web2py] Re: Orbited with web2py

2010-11-29 Thread salbefe
Thanks Candid ! It's a really good post to get started. On 29 nov, 22:27, Candid wrote: > I use orbited in one of my company's in-house web2py applications. It > works great. I did not have to integrate it with web2py though - I use > it as a completely independent message broker. There are som

[web2py] Re: xml advise

2010-11-29 Thread mdipierro
Mind that web2py has built-in soap implementation web2py/gluon/contrib/pysimplesoap/ and you can create services with @service.soap(...) def f(a,b): return a+b Mariano is the expert on this. On Nov 30, 1:24 am, Johann Spies wrote: > I have been busy with web2py for about a year and I am learn

[web2py] xml advise

2010-11-29 Thread Johann Spies
I have been busy with web2py for about a year and I am learning every day. I am also a newby as far as xml-processing is concerned. So I would like advice about the way to go with the following setup: I want to import xml-data collected through a soap client into a database. This will involve sev

[web2py] Re: Is there a way within the web2py DAL to create an alternate/secondary surrogate key on the fly?

2010-11-29 Thread cjrh
On Nov 30, 1:37 am, SaltyCow wrote: > For example, I have a table "quote" and I would like to be able to > refer to a given quote as something like "Q13". The actual primary > key (id) of the row for that quote may be just plain "3", but it's not > convenient to refer to a quote that way in em

[web2py] Re: Scalability of web2py?

2010-11-29 Thread mdipierro
I second! On Nov 29, 10:31 pm, Jason Brower wrote: > You may be suprised how good you are.  Especially in such short time you > can improve.  I went from barely scraping up web-pages to some pretty > impressive intra-net sites in just a few months. > .Net will eventually teach you how not to code

[web2py] Re: accessible_query implement in GAE.

2010-11-29 Thread mdipierro
Not yet. On Nov 29, 9:38 pm, appydev wrote: > Greetings > > Is there any way to do something like this in GAE? > > rows = db (auth.accessible_query ('read', db.mytable)). select > (db.mytable.ALL) > > Thanks

[web2py] Any web2py/python web developers in Salt Lake City?

2010-11-29 Thread cadrentes
I've been learning but too slowly to put together the application I envision, not my main job...looking for someone who can help.

[web2py] Re: T with variables

2010-11-29 Thread Richard
That translate app relies on writing to the file system to update a language file. What about for Google App Engine, where file writes are not allowed? Is it possible to store translations in the database instead? On Nov 27, 4:33 am, mdipierro wrote: > I see. There is this very old app:http://we

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Jason Brower
I did prototype in 2.5 weeks that would have taken months on Apache Tomcat (what they were currently using). And the company was massive, KONE. The content had to handle thousands of requests, work with 2 database times and lots of XML, and be easy to use and expand. I am not there now, but to th

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Jason Brower
You may be suprised how good you are. Especially in such short time you can improve. I went from barely scraping up web-pages to some pretty impressive intra-net sites in just a few months. .Net will eventually teach you how not to code. It makes you truly appriciate web2py. It's tough to have p

[web2py] accessible_query implement in GAE.

2010-11-29 Thread appydev
Greetings Is there any way to do something like this in GAE? rows = db (auth.accessible_query ('read', db.mytable)). select (db.mytable.ALL) Thanks

[web2py] Is there a way within the web2py DAL to create an alternate/secondary surrogate key on the fly?

2010-11-29 Thread SaltyCow
Hello, I'm new to web2py, so I hope that my first question isn't too crazy. Perhaps I shouldn't even be trying to do this in the DAL (or at all), but what I would like to do is create auto-incrementing unique fields for certain tables, but I do not necessarily want them to be primary keys. For e

[web2py] Re: session files, what's in it, how can they be read ?

2010-11-29 Thread mdipierro
They are pickle objects. empty by default. The names is generated in gluon/globals.py line 291 response.session_id = '%s-%s' % (client, uuid) Massimo On Nov 29, 6:45 pm, Stef Mientki wrote: > hello, > > session files, what's in it, how can they be read ? > and how is the name of the file gener

Re: [web2py] Re: Orbited with web2py

2010-11-29 Thread Jonathan Lundell
On Nov 29, 2010, at 4:32 PM, Albert Abril wrote: > What difference has Orbited with Comet? or is it related? > Related: http://www.oscon.com/oscon2008/public/schedule/detail/3048

[web2py] session files, what's in it, how can they be read ?

2010-11-29 Thread Stef Mientki
hello, session files, what's in it, how can they be read ? and how is the name of the file generated ? thanks, Stef

Re: [web2py] Re: Orbited with web2py

2010-11-29 Thread Albert Abril
What difference has Orbited with Comet? or is it related? http://en.wikipedia.org/wiki/Comet_(programming) On Mon, Nov 29, 2010 at 9:27 PM, Candid wrote: > I use orbited in one of my company's in-house web2py applications. It > works great. I did not have to integrate it with web2py though - I u

Re: [web2py] Re: Orbited with web2py

2010-11-29 Thread Albert Abril
What differences has Orbited with Comet? Or is it related? On Mon, Nov 29, 2010 at 9:27 PM, Candid wrote: > I use orbited in one of my company's in-house web2py applications. It > works great. I did not have to integrate it with web2py though - I use > it as a completely independent message bro

Re: [web2py] Re: XMLRPC

2010-11-29 Thread Branko Vukelic
Hm... I thought I tried that. Might have misses something. I'll check again. On Mon, Nov 29, 2010 at 2:51 PM, mdipierro wrote: > yes > > @service.xmlrpc > @service.jsonrpc > def f(a,b): return a+b > > On Nov 29, 2:19 am, Branko Vukelic wrote: >> On Mon, Nov 29, 2010 at 8:52 AM, Branko Vukelic w

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Lorin Rivers
The number of people that can write code better than I can is close to the number of people who CAN write code… On Nov 29, 2010, at 17:08 , Branko Vukelic wrote: > We know .NET will scale to thousands of nodes IF you write the .NET > code right. If you write crappy code (and that's inevitable if

Re: [web2py] Re: XMLRPC

2010-11-29 Thread Branko Vukelic
Yup. I definitely mistyped something when I checked the first time. On Tue, Nov 30, 2010 at 12:59 AM, Branko Vukelic wrote: > Hm... I thought I tried that. Might have misses something. I'll check again. > > On Mon, Nov 29, 2010 at 2:51 PM, mdipierro wrote: >> yes >> >> @service.xmlrpc >> @servic

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Branko Vukelic
We know .NET will scale to thousands of nodes IF you write the .NET code right. If you write crappy code (and that's inevitable if you don't like .NET or you don't know .NET), it will not only NOT run on thousands of nodes, but will probably crash all of them. Having said that... if they can help

Re: [web2py] Re: Beginner Auth problem

2010-11-29 Thread appydev
Massimo apology, no understand. Sorry if poorly formulated question, do not speak English and use google to translate. The registration form I made. working, and stored in the database correctly. My doubts began when I realized I lost functionality with respect to the registration form by defaul

[web2py] Re: Double invert

2010-11-29 Thread iiijjjiii
Thanks for the quick response. Very much appreciated! Cheers, Jim Karsten On Nov 29, 4:34 pm, mdipierro wrote: > I apologize for my too quick previous dismissal. On a second thought > this is a good idea. Your patch is in trunk. > > massimo >

[web2py] Re: Scalability of web2py?

2010-11-29 Thread Christopher Steel
+1 I agree, Web2py is excellent for low cost prototyping, much less than .NET and you will actually have something that works... I hear that these guys can kick one out in under a month -> http://experts4solutions.com/ ; ) Chris On Nov 29, 2:51 pm, mdipierro wrote: > Some political considerat

Re: [web2py] Re: JSONRPC notes

2010-11-29 Thread Branko Vukelic
On Mon, Nov 29, 2010 at 7:12 PM, ron_m wrote: > I would guess the id is so you can pair up the response if you had > more than one request outstanding in an AJAX situation? Yes. If you're doing multiple request asynchronously, that is also useful. Of course, you cannot omit the ``id`` parameter,

[web2py] Re: Beginner Auth problem

2010-11-29 Thread mdipierro
Lots. this form=SQLFORM.factory (table1, table2) form.accepts(...) will not do any database IO On Nov 29, 4:28 pm, appydev wrote: > Greetings. > > As above. I wanted to build a registration form to fill two tables, > auth_user and teacher. > > I use SQLFORM.factory (table1, table2) to create t

Re: [web2py] Beginner Auth problem

2010-11-29 Thread appydev
Greetings. As above. I wanted to build a registration form to fill two tables, auth_user and teacher. I use SQLFORM.factory (table1, table2) to create the form. http://www.web2pyslices.com/main/slices/take_slice/102 to fill the tables. And auth.settings.actions_disabled = ['register'] to disable

[web2py] Re: Scalability of web2py?

2010-11-29 Thread ron_m
:-) On Nov 29, 12:33 pm, Lorin Rivers wrote: > The good news is that the guy who hired ME picked web2py in the first place… > > On Nov 29, 2010, at 13:51 , mdipierro wrote: > > > > > Some political considerations (which may be wrong and off topic and > > improper)... > > > Here is a problem with

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Bruno Rocha
I made changes to routes_out too. 2010/11/29 Bruno Rocha > Thats my working solution: > > http://snipt.net/rochacbruno/routespy > > http://snipt.net/rochacbruno/routesconf > > 2010/11/29 Bruno Rocha > > Thanks! that works! >> >> should fix this in scripts/autoroutes.py >> >> 2010/11/29 mdipierr

[web2py] Re: Double invert

2010-11-29 Thread mdipierro
I apologize for my too quick previous dismissal. On a second thought this is a good idea. Your patch is in trunk. massimo On Nov 29, 9:09 am, iiijjjiii wrote: > Does it make sense to modify the gluon.sql Expression __invert__ > method so a double invert is possible. > > Currently this produces a

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread mdipierro
I would go for form = SQLFORM.factory(Field('name',requires=IS_IN_SET(['A', 'B', 'C']))) On Nov 29, 2:50 pm, CesarBustios wrote: > Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: > > form = FORM('Campaña ', >               INPUT(_type='text', _name='name', > requires=IS_IN_

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread CesarBustios
I want to make a dropdown list. regs=db(db.Campana.id > 0).select(orderby='nombre') form = FORM('Campaña: ', SELECT([c.nombre for c in regs], _name='camp'), INPUT(_type='submit', _value='Mostrar')) This worked fine :) On 29 nov, 16:16, DenesL wrote: > The IS_IN_SET l

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread DenesL
The IS_IN_SET looks good, but 'Campana' is not an HTML element. On Nov 29, 3:50 pm, CesarBustios wrote: > Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: > > form = FORM('Campaña ', >               INPUT(_type='text', _name='name', > requires=IS_IN_SET(['A', 'B', 'C'])), >

[web2py] Re: Double invert

2010-11-29 Thread DenesL
So far I have not needed this but it sounds logical. And an easy patch as given. e = ~db.person.name e is an expression meaning "person.name DESC" so e = ~e should be "person.name" not "person.name DESC DESC" +1 from me Denes. On Nov 29, 10:17 am, mdipierro wrote: > This should be automatic

[web2py] Re: Not really a web2py issue, but need help

2010-11-29 Thread JmiXIII
Works fine , thanks I saw it was a recurrent question, maybe you should add this in the book On 29 nov, 18:51, mdipierro wrote: > my bad > > def index(): >     rows = dict((r.id,r) for r in db(db.article).select()) >     for id,row in rows.items(): row.children=[] >     for id,row in rows.ite

[web2py] IS_IN_SET inside INPUT

2010-11-29 Thread CesarBustios
Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: form = FORM('Campaña ', INPUT(_type='text', _name='name', requires=IS_IN_SET(['A', 'B', 'C'])), INPUT(_type='submit')) I'm not sure this is the right code, can you help me out please? Thanks!

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Bruno Rocha
Thats my working solution: http://snipt.net/rochacbruno/routespy http://snipt.net/rochacbruno/routesconf 2010/11/29 Bruno Rocha > Thanks! that works! > > should fix this in scripts/autoroutes.py > > 2010/11/29 mdipierro > >> One things I see is that these two lines are wrong: >> >> >>

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Michele Comitini
great! 2010/11/29 Lorin Rivers : > The good news is that the guy who hired ME picked web2py in the first place… > > On Nov 29, 2010, at 13:51 , mdipierro wrote: > >> Some political considerations (which may be wrong and off topic and >> improper)... >> >> Here is a problem with external consultant

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Lorin Rivers
The good news is that the guy who hired ME picked web2py in the first place… On Nov 29, 2010, at 13:51 , mdipierro wrote: > Some political considerations (which may be wrong and off topic and > improper)... > > Here is a problem with external consultants. They make more per hours > than the aver

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Bruno Rocha
Thanks! that works! should fix this in scripts/autoroutes.py 2010/11/29 mdipierro > One things I see is that these two lines are wrong: > >('.*:https?://(.*\.)?%s:$method /static/$anything' % a,'%s/ > static/$anything' % app), >('.*:https?://(.*\.)?%s:$method /appadmin/$

[web2py] Re: Orbited with web2py

2010-11-29 Thread Candid
I use orbited in one of my company's in-house web2py applications. It works great. I did not have to integrate it with web2py though - I use it as a completely independent message broker. There are some python scripts that run in background and process some stuff and send notifications to browser t

[web2py] SQLForm.factory and identic fields names in differents tables

2010-11-29 Thread Richard Vézina
Hello, I would use a single form for different table that has relation. The problem it that those table are really similar. What should I do to avoid this problem? Is it possible? Here the model db.define_table('client', Field('name'), Field('title'), Field('date','date')) db.define_

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Michele Comitini
@Lorin Ask the consultant which architectures and languages he knows and let him make a table of advantages and pitfalls of each. You will be able to take your decisions then A solution that fits for any problems does not exist, but theorical scalability is a non issue on many frameworks. Indeed

[web2py] Re: Scalability of web2py?

2010-11-29 Thread mdipierro
Some political considerations (which may be wrong and off topic and improper)... Here is a problem with external consultants. They make more per hours than the average employees. They get hired because of their specific expertise to tell you what the boss wants to say but he prefers somebody else

[web2py] Re: Scalability of web2py?

2010-11-29 Thread ron_m
Sticking my nose in one more time :-) Another consideration for system choice is uptime loss for patch maintenance. From the tiny bit of information so far, the data collection off these scales may have to be nearly real time - web system down = nothing moves in the field. Is that true? I am havin

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Jonathan Lundell
On Nov 29, 2010, at 11:31 AM, mdipierro wrote: > > One things I see is that these two lines are wrong: > >('.*:https?://(.*\.)?%s:$method /static/$anything' % a,'%s/ > static/$anything' % app), >('.*:https?://(.*\.)?%s:$method /appadmin/$anything' % > a,'%s/appadmin/$anyth

[web2py] Re: Autoroutes and.static files

2010-11-29 Thread mdipierro
One things I see is that these two lines are wrong: ('.*:https?://(.*\.)?%s:$method /static/$anything' % a,'%s/ static/$anything' % app), ('.*:https?://(.*\.)?%s:$method /appadmin/$anything' % a,'%s/appadmin/$anything' % app), should be ('.*:https?://(.*\.)?%s

[web2py] Re: Scalability of web2py?

2010-11-29 Thread ron_m
Beware the consultant that only recommends what they know about. :-) Sounds like early optimisation attempts by the consultant if you ask me. You have to do a traffic analysis on the network - sounds like these are scales at remote locations - how often do they report in, how much information per

[web2py] checkbox in crud.read

2010-11-29 Thread Richard Vézina
Hello, I would like to know how to render a none active check box in crud.read form. Thanks Richard

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Lorin Rivers
Unfortunately, the killing argument is "we know .NET will scale to thousands of nodes, blah, blah, blah". This from (a guy who's smart and I respect, honestly) who uses his brand-new top-of-the-line 17" MBP to run Windows VMs in Parallels. On Nov 29, 2010, at 12:20 , Julio Schwarzbeck wrote: >

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Bruno Rocha
main.py --start-- rewrite.select(environ) print '_'*40,'routes_in','_'*40 print rewrite.thread.routes.routes_in print '_'*40,'routes_out','_'*40 print rewrite.thread.routes.routes_out print '_'*40,'PATH_INFO

[web2py] Re: Scalability of web2py?

2010-11-29 Thread Julio Schwarzbeck
And this without considering "vendor lock-in". web2py can run on a variety of platforms such as windows, macs. Linux and others, same goes for the selection of the back-end database. Much more flexibility under web2py in my opinion and prototyping is much faster in python. On Nov 29, 10:05 am, mdi

Re: [web2py] Re: Scalability of web2py?

2010-11-29 Thread Lorin Rivers
We're looking at utility scale deployments with thousands of nodes reporting data back to the server. That and the ability to compile .NET. On Nov 29, 2010, at 12:05 , mdipierro wrote: > You achieve scalability by replicating the web server behind a load > balancer. This is documented in the boo

[web2py] Re: JSONRPC notes

2010-11-29 Thread ron_m
I would guess the id is so you can pair up the response if you had more than one request outstanding in an AJAX situation? On Nov 29, 12:39 am, Branko Vukelic wrote: > Some notes I'd like to share. Comments and advice most welcome! > > web2py supports JSONRPC 1.1 (and not 2.0 which is still a pro

[web2py] Re: Scalability of web2py?

2010-11-29 Thread mdipierro
You achieve scalability by replicating the web server behind a load balancer. This is documented in the book, chapter 11, using HAProxy. All frameworks work the same way in this respect. web2py has no intrinsic limitations. The bottle neck is the database connection. All frameworks have the same pr

[web2py] Scalability of web2py?

2010-11-29 Thread Lorin Rivers
The project I'm working on has hired a consultant who is now recommending .Net in place of web2py or even rails. What's the 'largest' scale web2py is known to perform well on? -- Lorin Rivers Mosasaur: Killer Technical Marketing 512/203.31

[web2py] Re: Using Jython with web2py

2010-11-29 Thread mdipierro
For me Enterprise means: - easy to use (low startup costs) - always backward compatible (worth the investment) - enterprise = business + non-profit; enterprise != large bloated bussiness I do not disagree with your definition: "pragmatic, agile and extensible web framework for fast development".

[web2py] Re: Not really a web2py issue, but need help

2010-11-29 Thread mdipierro
my bad def index(): rows = dict((r.id,r) for r in db(db.article).select()) for id,row in rows.items(): row.children=[] for id,row in rows.items(): if row.f_parent==1: root=row else: rows[row.f_parent].children.append(row) def tree(row): return DIV(H1(row.tit

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Jonathan Lundell
On Nov 29, 2010, at 6:30 AM, mdipierro wrote: > > I am going to need some help with debugging. In main.py, after > rewrite.select(environ) > > can you log the values of > 1) rewrite.thread.routes.routes_in > 2) rewrite.thread.routes.routes_out > 3) environ['PATH_INFO'] > > when you call /static/

Re: [web2py] Re: Using swedish special characters å äö

2010-11-29 Thread Kenneth Lundström
Hello Mirek, thank you for your example. In my case it didn´t help. If I look at the file in Notepad åäö are shown correctly by when opening the file by dubble clicking it opens Excel but åäö aren´t shown correctly, for some reason Excel uses "wrong" charset, if I import the file to Excel with

[web2py] Re: Using Jython with web2py

2010-11-29 Thread pierreth
On Nov 29, 8:53 am, mdipierro wrote: > Why all your messages are always posted 2 or 3 times? We should try > fix that. Sorry for this. I click the refresh button after a post for see what are the replies. This post back the same message again (I thought the interface would be smart enough to reje

[web2py] Re: Not really a web2py issue, but need help

2010-11-29 Thread JmiXIII
Hello, here is what I did: db.define_table('article', Field('f_parent','reference article'), Field('title')) ## def index(): rows = dict((r.id,r) for r in db(db.article).select()) for id,row in rows.items(): row.children=[] for id,row in rows.items(): if row.f_pare

[web2py] Re: onvalidation valid for every form button?

2010-11-29 Thread DenesL
Since you are submitting to the same controller I don't see a problem, onvalidation will run (or not if there are form.errors) in both cases. On Nov 29, 11:33 am, António Ramos wrote: > Hello > i want to use a form and want to use the onvalidation to call a function. > My question is , > Is the

[web2py] onvalidation valid for every form button?

2010-11-29 Thread António Ramos
Hello i want to use a form and want to use the onvalidation to call a function. My question is , Is the submit button the only way to trigger the onvalidation event ? I ask this because i want 2 buttons, the first submits with var=1 and the second submit with var=2 How can i use this 2 buttons ins

[web2py] Orbited with web2py

2010-11-29 Thread salbefe
Hello, I need to push some content in my website in 'real time'. I'm asking if someone had tried orbited (http://orbited.org/). After reading this post: Integrating Orbited with Web App Frameworks (http://orbited.org/ blog/2008/09/integrating-orbited-with-web-app-frameworks/) it seems that it shou

[web2py] JSON into a html view

2010-11-29 Thread Lorin Rivers
How do I insert the results of a function into an html view as JSON? Specifically I need a javascript variable in the view to include my JSON. -- Lorin Rivers Mosasaur: Killer Technical Marketing 512/203.3198 (m)

[web2py] Re: Double invert

2010-11-29 Thread mdipierro
This should be automatic behavior in the new dal (dal.py). I do not think it is work spending time changing this in the current dal (sql.py). Massimo On Nov 29, 9:09 am, iiijjjiii wrote: > Does it make sense to modify the gluon.sql Expression __invert__ > method so a double invert is possible. >

[web2py] Double invert

2010-11-29 Thread iiijjjiii
Does it make sense to modify the gluon.sql Expression __invert__ method so a double invert is possible. Currently this produces an error: print db().select(db.person.name, orderby=~~db.person.name) ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corr

[web2py] Re: Using swedish special characters åäö

2010-11-29 Thread Mirek Zvolský
> Swedish special characters... > But when sending them to a CSV file and opening it in Excel are not > shown correctly. Here my code (functions in controller). I'm not sure if this is correct solution, but it works for me. I think response header 'Content-Type' with 'utf-8' is important. My code

[web2py] Re: Autoroutes and.static files

2010-11-29 Thread mdipierro
I am going to need some help with debugging. In main.py, after rewrite.select(environ) can you log the values of 1) rewrite.thread.routes.routes_in 2) rewrite.thread.routes.routes_out 3) environ['PATH_INFO'] when you call /static/image.png? massimo On Nov 29, 8:19 am, Bruno Rocha wrote: > Not

[web2py] Re: Problem with linking 2 pages

2010-11-29 Thread mdipierro
say you have # in controllers/default.py def page1(): return dict() def page2(): return dict() # in views/default/page1.html Any html you like here link to page2 On Nov 29, 4:52 am, Eleni wrote: > I started learning how to use web2py a few days ago and I don't > understand how we

Re: [web2py] Re: Autoroutes and.static files

2010-11-29 Thread Bruno Rocha
Not working here, I have an image called image.png in /static without autoroutes I can access with http://127.0.0.1:8080/blouweb/static/image.png with autotoutes I can't access with http://127.0.0.1:8080/static/image.png 2010/11/29 mdipierro > http://.../static/filename? > does it not work? >

[web2py] Re: Autoroutes and.static files

2010-11-29 Thread mdipierro
http://.../static/filename? does it not work? On Nov 29, 5:25 am, rochacbruno wrote: > HI, I am trying to use autoroutes for the first time, what I want is my site > running in127.0.0.1:8080/index instead of127.0.0.1:8080/app/default/index > > I tried the autoroutes and routes.conf explained in

[web2py] Re: Web2py book - virtual fields section improvements

2010-11-29 Thread mdipierro
Honestly I do not think there is any reason to use "lazy" virtual fields. If you have virtual fields, they are always part of the select. What is the problem? you want to filter them out in tables? Than you should use the SQLTABLE(...,fields=[...]) attribute. Massimo On Nov 24, 11:49 pm, Adi wr

[web2py] Re: Using Jython with web2py

2010-11-29 Thread mdipierro
Why all your messages are always posted 2 or 3 times? We should try fix that. On Nov 29, 2:58 am, pierreth wrote: > On Nov 29, 1:39 am, mdipierro wrote: > > > please let us know if things work or do not work. We have not tested > > web2py with jython much, > > > Massimo > > Well, I won't dig tha

[web2py] Re: XMLRPC

2010-11-29 Thread mdipierro
yes @service.xmlrpc @service.jsonrpc def f(a,b): return a+b On Nov 29, 2:19 am, Branko Vukelic wrote: > On Mon, Nov 29, 2010 at 8:52 AM, Branko Vukelic wrote: > > Thanks. Thats this mean one can run multiple services using the same > > controller method? > > I guess not. > > -- > Branko Vukelić

[web2py] Problem with linking 2 pages

2010-11-29 Thread Eleni
I started learning how to use web2py a few days ago and I don't understand how we can link 2 pages with each other. I want to link the index page with 3 other sub-pages. I tried to do as the example (default/first and default second) but I failed because I dont want to create 2 other pages with a l

[web2py] Re: Forms and their customisation

2010-11-29 Thread Emceha
Thanks :) both work great :) Marcin On Nov 29, 12:44 pm, "mr.freeze" wrote: > You can also use a widget: > > def textarea_widget(f,v): >     inp = SQLFORM.widgets.text.widget(f,v) >     inp['_cols'] = 50 >     inp['_rows'] = 50 >     return inp > > db.table.field.widget = textarea_widget > > On

Re: [web2py] Re: Forms and their customisation

2010-11-29 Thread Daniel Gonzalez
Hi, when i said: db.artykuly.textareafield.represent I want to say that "textareafield" was your field in the definition of your db. Like: db.define_table('artykuly', Field('yourtextareafield', 'text') I said that because i didn't know how your field is named :) Anyway, mr.freeze has sent

[web2py] Re: Forms and their customisation

2010-11-29 Thread Emceha
Thanks Daniel for hint. Unfortunately it looks like db object doesn't have textareafield attribute: google_appengine/web2py/gluon/sql.py", line 1703, in __getattr__ return dict.__getitem__(self,key) KeyError: 'textareafield' That's what I'm getting now :( On Nov 29, 11:43 am, Daniel Gonzale

[web2py] Re: Forms and their customisation

2010-11-29 Thread mr.freeze
You can also use a widget: def textarea_widget(f,v): inp = SQLFORM.widgets.text.widget(f,v) inp['_cols'] = 50 inp['_rows'] = 50 return inp db.table.field.widget = textarea_widget On Nov 29, 5:39 am, "mr.freeze" wrote: > You can do: > form = crud.create(db.table) > textarea = fo

[web2py] Re: Forms and their customisation

2010-11-29 Thread mr.freeze
You can do: form = crud.create(db.table) textarea = form.element('textarea') textarea['_rows'] = 50 textarea['_cols'] = 50 form.element will grab the first matching element. If you want to be more specific you can do: form.element('textarea',_id='table_field') On Nov 29, 4:11 am, Emceha wrote: >

[web2py] Re: Not really a web2py issue, but need help

2010-11-29 Thread JmiXIII
That's it I'll try it thanks a lot! On 29 nov, 00:48, mdipierro wrote: > I assume you are trying to build a hierarchial tree of articles and > you want them all from the parent. > > I would do this something like this: > > db.define_table('article',Field('f_parent','reference > article'),Field('

[web2py] Autoroutes and.static files

2010-11-29 Thread rochacbruno
HI, I am trying to use autoroutes for the first time, what I want is my site running in127.0.0.1:8080/index instead of127.0.0.1:8080/app/default/index I tried the autoroutes and routes.conf explained in another thread here but i didn't figure out how to make the access to static files. I am us

[web2py] Re: Web2py book - virtual fields section improvements

2010-11-29 Thread Adi
Any comments? On Nov 25, 10:49 am, Adi wrote: > Hi all, > > I spent hours yesterday trying to implement virtual fields correctly > following the book, and based on that I found some behaviour which > could be better explained. > > Reference:http://web2py.com/book/default/chapter/06#Virtual-Fields

Re: [web2py] Re: Forms and their customisation

2010-11-29 Thread Daniel Gonzalez
I dont know if this could work for you: def dodaj_artykul(): db.artykuly.textareafield.represent = lambda k: TEXTAREA(value=k, _cols=100, _rows=100) form=crud.create(db.artykuly,next='pokaz_artykul/[id]') return dict(form=form) I don't know how this could affect the functionlity of the

Re: [web2py] Tweaking JSON

2010-11-29 Thread Branko Vukelic
On Mon, Nov 29, 2010 at 9:53 AM, Lorin Rivers wrote: > I need to change the JSON output I get from this: > [{"FreezeTime": "2010-11-08 21:00", "Irrad_avg": 605.00}, {"FreezeTime": > "2010-11-08 21:01", "Irrad_avg": 600.66}] > > to something more like this: > > [['2010-11-08 21:00',605.00], ['2010

[web2py] Re: Forms and their customisation

2010-11-29 Thread Emceha
Thanks Daniel for prompt reply, I've read chapter 7 already, also did some google search - but I was wondering if there is easier way to do it - (with less code and maybe just passing some parameters on crud.create as it's not really customization I want to do - I would call it more like forms set

Re: [web2py] Forms and their customisation

2010-11-29 Thread Daniel Gonzalez
Hi, Checkout the chapter 7 of the book, specially this part: http://web2py.com/book/default/chapter/07#Custom-forms Regards Daniel El lun, 29-11-2010 a las 02:11 -0800, Emceha escribió: > Here is my controller code: > > def dodaj_artykul(): > form=crud.create(db.artykuly,next='pokaz_artyku

[web2py] Forms and their customisation

2010-11-29 Thread Emceha
Here is my controller code: def dodaj_artykul(): form=crud.create(db.artykuly,next='pokaz_artykul/[id]') return dict(form=form) I see that textarea always has cols=40 and rows=10 - I wanted to change that value but I haven't found any straight forward example to do it using CRUD only? Sh

[web2py] Re: Using Jython with web2py

2010-11-29 Thread pierreth
On Nov 29, 1:39 am, mdipierro wrote: > please let us know if things work or do not work. We have not tested > web2py with jython much, > > Massimo > Well, I won't dig that much in Jython with web2py for the moment. In a longer term interest, I would like to be able to use web2py in a Java infrast

[web2py] Tweaking JSON

2010-11-29 Thread Lorin Rivers
I need to change the JSON output I get from this: [{"FreezeTime": "2010-11-08 21:00", "Irrad_avg": 605.00}, {"FreezeTime": "2010-11-08 21:01", "Irrad_avg": 600.66}] to something more like this: [['2010-11-08 21:00',605.00], ['2010-11-08 21:01',600.66]] At the moment I'm using the simplejson.dum

[web2py] Re: Using Jython with web2py

2010-11-29 Thread pierreth
On Nov 29, 1:39 am, mdipierro wrote: > please let us know if things work or do not work. We have not tested > web2py with jython much, > > Massimo > Well, I won't dig that much in Jython with web2py for the moment. In a longer term interest, I would like to be able to use web2py in a Java infrast

[web2py] JSONRPC notes

2010-11-29 Thread Branko Vukelic
Some notes I'd like to share. Comments and advice most welcome! web2py supports JSONRPC 1.1 (and not 2.0 which is still a proposal). This means there is no support for keyword arguments at this moment. To work around this you can pass your methods a single argument which is a dict, and parse the d

Re: [web2py] Re: XMLRPC

2010-11-29 Thread Branko Vukelic
On Mon, Nov 29, 2010 at 8:52 AM, Branko Vukelic wrote: > Thanks. Thats this mean one can run multiple services using the same > controller method? I guess not. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfoli

[web2py] Re: Using Jython with web2py

2010-11-29 Thread pierreth
On Nov 29, 1:39 am, mdipierro wrote: > please let us know if things work or do not work. We have not tested > web2py with jython much, > > Massimo > Well, I won't dig that much in Jython with web2py for the moment. In a longer term interest, I would like to be able to use web2py in a Java infrast