[web2py] Conditional IS_NOT_EMPTY

2010-12-02 Thread António Ramos
hello, in a model i define a table tab1 and a field f1 that if some condition is met should be not empty, otherwise could be empty How do i code this situation at model level? Best regards António

[web2py] Re: Table names: plural or singular?

2010-12-02 Thread Kostas M
Ok, I understand that, but I am trying to implement a generic controller (e.g. 'mylist') which takes as argument a table name (e.g. 'units') and returns its records. This is fine done, but I would like to have also a header of the returned table, which is kind of a 'label' of the table, and it is

[web2py] Re: Problems with mail.send()

2010-12-02 Thread Bernardo
Hi Massimo, I finally found where the problem is. It is something to do with the SASL CRAM-MD5 authentification at server side. Just to debug purposes, is there any way to use the 'sasl_method=PLAIN' when using mail.send()? thanks a lot, Bernardo On 1 dic, 23:38, Bernardo estem...@gmail.com

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Branko Vukelic
How about we do something similar to what Blender foundation is doing for Blender? Build an interesting web app every year as a community project, and deploy it somewhere, get some publicity, have people try it... While doing that, we could focus our efforts on improving web2py etc. The project

[web2py] Server slow

2010-12-02 Thread Kenneth Lundström
Hello list, need some help finding out why my server is so slow. The server is with a Intel Celeron 2.66 GHz CPU, 4 GB of memory CentOS 5.5 64-bit, Apache 2.2.3, MySQL 5.0.77, mod_wsgi, Web2py 1.89.5 The server is dedicated to web2py, there is three instances of web2py running. I have

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Tom Atkins
I'm assuming John Heenan's criticisms of web2py would apply equally to Django? Please correct me if I'm wrong. Django can scale pretty well - here's a presentation showing how Disqus have scaled their Django app to 250 million visitors a month and a peak of 17,000 requests per second to Django

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Tom Atkins
I should have said John Heenan's criticisms of web2py *relating to scalability*... On 2 December 2010 11:46, Tom Atkins minkto...@gmail.com wrote: I'm assuming John Heenan's criticisms of web2py would apply equally to Django? Please correct me if I'm wrong. Django can scale pretty well -

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Kuba Kucharski
requests per second to Django with Apache and mod_wsgi: http://nosql.mypopescu.com/post/1409154668/disqus-scaling-the-worlds-largest-django-application exactly and already mentioned in this thread Real WORLD scalable implementations are VERY CUSTOM thing. like for example:

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Tom Atkins
Very sorry - I missed the link you already posted - will make sure to read full thread in the future! On 2 December 2010 12:23, Kuba Kucharski kuba.kuchar...@gmail.com wrote: requests per second to Django with Apache and mod_wsgi:

[web2py] Invalid function for logged in users

2010-12-02 Thread Rohan
Hi All, I have a page which can be viewed by both visitors (not logged in) and logged in users. Page works fine for visitors but when I visit page after logging in, invalid function is shown on page and no error is thrown. I put few debug logs in controller and logs are getting printed. What

[web2py] Geraldo Reports 4.0

2010-12-02 Thread Bruno Rocha
Is there someone using Geraldo Reports 4.0 with web2py? http://www.geraldoreports.org/blog/releasing-04/ sometime ago someone created a tutorial http://www.geraldoreports.org/docs/tutorial-web2py.html but I guess this is outdated for the new version. I am giving a try today, if someone has a

[web2py] Re: Server slow

2010-12-02 Thread Kenneth Lundström
Of course I forgot something, python 2.6.5 Kenneth Hello list, need some help finding out why my server is so slow. The server is with a Intel Celeron 2.66 GHz CPU, 4 GB of memory CentOS 5.5 64-bit, Apache 2.2.3, MySQL 5.0.77, mod_wsgi, Web2py 1.89.5 The server is dedicated to web2py,

[web2py] Re: Table names: plural or singular?

2010-12-02 Thread mdipierro
You should be able to do db.unit.label=Τ('physics units') On Dec 2, 4:18 am, Kostas M kmo...@hotmail.com wrote: Ok, I understand that, but I am trying to implement a generic controller (e.g. 'mylist') which takes as argument a table name (e.g. 'units') and returns its records. This is fine

[web2py] Conditional represent

2010-12-02 Thread Johann Spies
I want the id of a record show an 'edit' (eg. crud.update) link when certain users are logged in and 'show' (crud.read) when others are logged in. How can that be done using lambda? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our

[web2py] Re: Problems with mail.send()

2010-12-02 Thread mdipierro
No but I can add that. I will take a look. On Dec 2, 4:35 am, Bernardo estem...@gmail.com wrote: Hi Massimo, I finally found where the problem is. It is something to do with the SASL CRAM-MD5 authentification at server side. Just to debug purposes, is there any way to use the

[web2py] Re: Scalability of web2py?

2010-12-02 Thread mdipierro
I thought experts4solutions.com would help with that. On Dec 2, 5:07 am, Branko Vukelic bg.bra...@gmail.com wrote: How about we do something similar to what Blender foundation is doing for Blender? Build an interesting web app every year as a community project, and deploy it somewhere, get

[web2py] Re: Conditional represent

2010-12-02 Thread David Marko
You can at least do in your model file: if user=='edit': # or your condition db.table.field.represent= else: db.table.field.represent= David On 2 pro, 15:14, Johann Spies johann.sp...@gmail.com wrote: I want the id of a record show an 'edit' (eg. crud.update) link when certain

[web2py] Re: Server slow

2010-12-02 Thread mdipierro
Please tell us more about the setup. Are the three instances behind running on the same server? why three? What do they do? This is not normal but I suspect the problem is with database. Did you set DAL(...,pool_size=10)? On Dec 2, 5:13 am, Kenneth Lundström kenneth.t.lundst...@gmail.com

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Branko Vukelic
On Thu, Dec 2, 2010 at 3:18 PM, mdipierro mdipie...@cs.depaul.edu wrote: I thought experts4solutions.com would help with that. Well, it hasn't proposed any projects yet, no? What I had in mind is something along the lines of: Ok, so Company XXX has a product that does A, B, and C. The goal of

Re: [web2py] Re: Server slow

2010-12-02 Thread Kenneth Lundström
Please tell us more about the setup. Are the three instances behind running on the same server? Yes. why three? What do they do? One is production, one is testing and last one is development. I had two instances running on a virtual server before and it worked fine. This is not normal

[web2py] Re: how do get me to imporsonate a generic user?

2010-12-02 Thread mart
interesting... the risk for me is just about a non-issue so it didn't occur to me... this is for a web app living inside a corporate network where the same resources could be had by other means. the impersonate feature would be very efficient and convenient in this case, would there be another to

[web2py] Re: plugin_wiki problems

2010-12-02 Thread blackthorne
Sorry to rehash this topic. It's that important to me. What I really want is the plugin_wiki functionality but without compromising the MVC way of making things with web2py. I wanted to be able to create some pages with the plugin_wiki in a way that allowed me to plug a normal controller and a

[web2py] Help requested with form redirect

2010-12-02 Thread Johann Spies
Maybe I am just tired now. I am struggling to find the mistake and will appreciate some help please. I want to select an ID from one table and use that ID to show the full record from one table and related records from another table. Two problems: 1. If I use {{=form}} for the first form in '

Re: [web2py] Re: Conditional represent

2010-12-02 Thread Johann Spies
On 2 December 2010 16:23, David Marko dma...@tiscali.cz wrote: You can at least do in your model file: if user=='edit': # or your condition db.table.field.represent= else: db.table.field.represent= Thanks. It has clearly not been my best day :) Regards Johann -- May grace

[web2py] Re: Table names: plural or singular?

2010-12-02 Thread Kostas M
Thanks! Sometimes I still forget the flexibility offered by Python.. On 2 Δεκ, 16:12, mdipierro mdipie...@cs.depaul.edu wrote: You should be able to do db.unit.label=Τ('physics units') I think  it would be nice and coherent if it was possible to set an additonal attribute to atablewith

[web2py] NicEdit + upload + GAE

2010-12-02 Thread Emceha
Hi, Does any of you have an experience with such combination? I was wondering about how easy it would be to implement such option like uploading using inline editor with GAE blob for image storage. Thanks for any hint's links to blog's or ideas. Marcin

Re: [web2py] Re: Scalability of web2py?

2010-12-02 Thread Michele Comitini
@John I think the best argument to end this discussion, is that someone, possibly you, write a simple and sane example that brings down and locks web2py, so we will come over it and there will be no excuse to fix. mic On Thu, Dec 2, 2010 at 3:18 PM, mdipierro mdipie...@cs.depaul.edu wrote: I

Re: [web2py] Re: Server slow

2010-12-02 Thread Michele Comitini
Kenneth, When you test is that the only active connection to the db? 2010/12/2 Kenneth Lundström kenneth.t.lundst...@gmail.com: Please tell us more about the setup. Are the three instances behind running on the same server? Yes. why three? What do they do? One is production, one is

[web2py] disable insertion for crud.create/update on DEMO_MODE

2010-12-02 Thread selecta
I want to create a demo mode for my application where everything should look like it works nomally but the actual insertion of data should be prevented. Is it possible to do that if I use crud.create/ update?? Or should I replace all forms with form_factory forms?

[web2py] Re: disable insertion for crud.create/update on DEMO_MODE

2010-12-02 Thread mdipierro
I could easily add this feature but should it be done only for crud? Perhaps the demo mode should be done at the dal layer. Massimo On Dec 2, 12:37 pm, selecta gr...@delarue-berlin.de wrote: I want to create a demo mode for my application where everything should look like it works nomally but

[web2py] Re: how do get me to imporsonate a generic user?

2010-12-02 Thread mdipierro
The security risk is not the existance of the function but the way the parameters are passed to the function. I changed it in trunk, please give it a try and tell me what you think before we make it into stable. Massimo On Dec 2, 9:19 am, mart msenecal...@gmail.com wrote: interesting... the

[web2py] Re: plugin_wiki problems

2010-12-02 Thread mdipierro
But you can do def index(): return dict(comments=plugin_wiki.widget('comments')) {{extend 'layout.html'}} {{='bla '*100}} {{=comments}} what is wrong with this? On Dec 2, 9:27 am, blackthorne francisco@gmail.com wrote: Sorry to rehash this topic. It's that important to me. What I

[web2py] Re: Help requested with form redirect

2010-12-02 Thread mdipierro
You have two forms both called form (the second overwrites the first one) and you return only one of the return dict(...,form=form) You should call them form1 and form2 and return both. On Dec 2, 9:52 am, Johann Spies johann.sp...@gmail.com wrote: Maybe I am just tired now.  I am struggling to

[web2py] built-in functionality to show tree-like html tables (via sqltable)?

2010-12-02 Thread Carlos
Hi, Taking the example of the auth_* model (users, groups, memberships, permissions), is there built-in functionality to show this kind of inter-related data (including many-to-many) via SQLTABLE, or should I just do it from scratch with the helpers?. Something like the following per each user

[web2py] help with view of rows

2010-12-02 Thread mmartinez
Good afternoon, everyone. My query is: I query the database controllers/default.py, is specifically left=db.clientes.on(db.accountcode.id_clientes==db.clientes.id) rows=db().select(db.accountcode.ani, db.clientes.rsocial, left=left, orderby=db.clientes.rsocial) If I print rows the result

Re: [web2py] help with view of rows

2010-12-02 Thread Richard Vézina
truncate=BIGNUMBER BIGNUMBER = the max string length of your longer string... Richard On Thu, Dec 2, 2010 at 3:20 PM, mmartinez alexra...@gmail.com wrote: Good afternoon, everyone. My query is: I query the database controllers/default.py, is specifically

Re: [web2py] help with view of rows

2010-12-02 Thread Richard Vézina
table=SQLTABLE(rows,truncate=...) return (table=table) in view {{=table}} On Thu, Dec 2, 2010 at 3:24 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: truncate=BIGNUMBER BIGNUMBER = the max string length of your longer string... Richard On Thu, Dec 2, 2010 at 3:20 PM, mmartinez

Re: [web2py] help with view of rows

2010-12-02 Thread Marcelo Martinez
I have worked placing table = SQLTABLE (rows, truncate = number) Now a new query I can take a SQLTables to display the plugin data_tables 2010/12/2 Richard Vézina ml.richard.vez...@gmail.com table=SQLTABLE(rows,truncate=...) return (table=table) in view {{=table}} On Thu, Dec 2,

Re: [web2py] help with view of rows

2010-12-02 Thread Richard Vézina
? I don't follow you. Richard On Thu, Dec 2, 2010 at 4:00 PM, Marcelo Martinez alexra...@gmail.comwrote: I have worked placing table = SQLTABLE (rows, truncate = number) Now a new query I can take a SQLTables to display the plugin data_tables 2010/12/2 Richard Vézina

[web2py] Re: plugin_wiki problems

2010-12-02 Thread blackthorne
Thank you for your answer. Oh, but I do want the wiki behaviour, not just a widget. I just want the wiki behavior without throwing away the common web2py development flow with my model, my controllers and possible specific views. Consider this, Let's say I make a request to .../whatever/mypage

Re: [web2py] Re: Server slow

2010-12-02 Thread Kenneth Lundström
When you test is that the only active connection to the db? I tested it on an application running on the test instance. There could have been lite activity one production site. But when I tested loading the same function five times in about 10 minutes I allways 39 seconds to load the data.

[web2py] Re: Conditional IS_NOT_EMPTY

2010-12-02 Thread DenesL
You can always change requires on the fly. def action(): # over simplified if request.vars.condition: db.tab1.f1.requires=another_validator(...) form=... On Dec 2, 4:57 am, António Ramos ramstei...@gmail.com wrote: hello, in a model i define a table tab1 and a field f1 that if some

[web2py] Error running Web2py admin app non-SSL apps together with mod_wsgi

2010-12-02 Thread azarkowsky
Hi, I'm running Web2py version 1.89.1 and attempting to set up a production enviornment (Windows Server 2008) on our Intranet running behind Apache with mod_wsgi mod_auth_sspi (for grabbing the current Windows username). Since this is an Intranet application only, I'd like to have access to

RE: [web2py] convert python list to javascript array

2010-12-02 Thread Josh Jaques
Sounds like you're looking for response.json def test(): coords = ((1,2), (3,4), (5,6)) return response.json(coords=coords) Returns a javascript array formatted like: [[1, 2], [3, 4], [5, 6]] Or you can use response.json(dict(coords=coords)) to get a javascript object: {coords: [[1,

[web2py] Re: Scalability of web2py?

2010-12-02 Thread John Heenan
Let us be blunt about this. Web2py is out there megalomaniacally presenting itself as all things to all people at a web framework level. As it is now, Web2py is a very impressive achievement. At a purely technical level Web2py is superior to Django in a large number of important aspects. But that

[web2py] I Just Need a Programmer

2010-12-02 Thread mdipierro
http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2010-12.html#e2010-12-01T15_45_40.htm

[web2py] Supporting user translations on GAE

2010-12-02 Thread Richard
I want to allow users to add languages and translate strings for my app. The app is hosted on GAE so overriding the translation files is not allowed. What do you recommend? - override T() with my own helper that reads from the database?

[web2py] Re: Error running Web2py admin app non-SSL apps together with mod_wsgi

2010-12-02 Thread mdipierro
The problem seems to be in serializing the sessions and I suspect the two virtual hosts confuse mod_wsgi about the web2py location. Perhaps this is because they have different DocumentRoot and none of them is what it should be. Try use the examples listed here:

[web2py] Re: Server slow

2010-12-02 Thread mdipierro
try import time, logging def testing(): t0=time.time() orders = db(db.orders.id 0).select() logging.info('time to fetch %s' % (time.time()-t0)) return orders so you can isolate the problem and see if it is in fetching or somewhere else (for example session locking). On Dec 2,

[web2py] Re: I Just Need a Programmer

2010-12-02 Thread weheh
The vacuum is full of wonderful ideas. However, execution is everything.

[web2py] GAE 1.4.0

2010-12-02 Thread Richard
Some nice improvements in the latest release: http://googleappengine.blogspot.com/2010/12/happy-holidays-from-app-engine-team-140.html

[web2py] Re: Scalability of web2py?

2010-12-02 Thread Anthony
Hi John, You make some good points, but... Let us be blunt about this. Web2py is out there megalomaniacally presenting itself as all things to all people at a web framework level. I don't think this is quite fair. web2py is presented as a general purpose framework for building web

[web2py] Re: Anyone willing to help out with Paypal

2010-12-02 Thread Michael McGinnis
That's great. I will be running on GAE, so I guess it wouldn't work for me. I expect that all I would need is a notification that the payment has been credited to my Paypal account, and how much, so the amount can be credited to the user's account in my system. I would also like to transfer

[web2py] Re: Anyone willing to help out with Paypal

2010-12-02 Thread Anthony
Is tenthrow.com still actively maintained? Looks like no new concerts or playlists since June. It's a cool site. On Nov 26, 9:33 am, howesc how...@umich.edu wrote: hi all, i integrated paypal website payments standard onwww.tenthrow.com, using encrypted payment buttons and IPN (instant

[web2py] Rocket 1.2

2010-12-02 Thread Jonathan Lundell
Rocket 1.2.0 (web2py's embedded web server) is now in the trunk. It have various improvements, which perhaps Tim will describe. There is one user-visible interface change that might affect some of you. In the previous version, Rocket's min_threads and max_threads were 10 and 1024 respectively.

[web2py] Re: I Just Need a Programmer

2010-12-02 Thread Anthony
I think web2py is really making it more and more feasible for the idea person to become the programmer, as suggested in the article. :) On Dec 2, 10:14 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://www.cs.uni.edu/~wallingf/blog/archives/monthly/2010-12.html#e2...

[web2py] Re: Scalability of web2py?

2010-12-02 Thread pbreit
I don't think anyone is comparing web2py to .net (thank goodness). A better comparison is Ruby on Rails and Massimo is a bit like DHH. I get the impression that he is pretty passionate about web2py and his position at the university would enable him to continue working on it for awhile. And if

[web2py] Re: I Just Need a Programmer

2010-12-02 Thread pbreit
This is a brilliant observation and Anthony, I think you are right on. I am a fairly inexperienced programmer, having dabbled with PHP over the years but never really creating anything, but web2py has got me extremely excited that I can really implement some of my ideas. Massimo has struck an