[web2py] web2py on Kodingen?

2010-03-19 Thread mr.freeze
It appears that Kodingen can run Django and Ruby apps. Someone with
strong Apache-fu should try to get web2py working :)

http://kodingen.com/?2010/01/27/get-ruby-working/
http://kodingen.com/?groups/django-on-kodingen

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Possible bug in Field.__getslice__

2010-03-19 Thread mr.freeze
They are now! I sent you a patch.

On Mar 19, 9:09 pm, mdipierro  wrote:
> True. Can you send me a patch? For now we just assume that slices with
> negative indexes are not supported.
>
> On Mar 19, 7:19 pm, "mr.freeze"  wrote:
>
> > Correct me if I'm wrong but...
>
> > In Field.__getslice__, when 'start' is less than 0, pos0 is a string
> > but the function always tries to do 'int(pos0) + 1'
> > The function should also probably check if 'stop' is sys.maxint which
> > is what will be passed for things like [-4:]
>
> > Also, are there two __getitem__ functions on purpose? Maybe the first
> > one just needs to be removed.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget suggestion

2010-03-19 Thread Peter Etchells
to continue, after finger trouble...

  .select(distinct=distinct,
with argdistinct=False in __init--


another less useful suggestion is to optionally allow the search on
any part of the string, rather than just the beginning.
rows = self.db(field.like('%'+
self.request.vars[self.keyword]+'%'))\

the autocomplete list is a little strange looking at first, but still
delivers useful results, especially if there are a lot of strings with
the same long startswith.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] AutocompleteWidget suggestion

2010-03-19 Thread Peter Etchells
Autocomplete is a very useful widget, thanks.

In case it has missed anyone's attention, it can be used to
autocomplete strings without reference to another table or field, eg

db.person.name.widget=AutocompleteWidget(request, db.person.name)

In this case, it is useful to have a autocomplete list with no
duplicates.

This can be achieved in the widget with (in line 399
.select(distinct=True, ...
or

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Possible bug in Field.__getslice__

2010-03-19 Thread mdipierro
True. Can you send me a patch? For now we just assume that slices with
negative indexes are not supported.

On Mar 19, 7:19 pm, "mr.freeze"  wrote:
> Correct me if I'm wrong but...
>
> In Field.__getslice__, when 'start' is less than 0, pos0 is a string
> but the function always tries to do 'int(pos0) + 1'
> The function should also probably check if 'stop' is sys.maxint which
> is what will be passed for things like [-4:]
>
> Also, are there two __getitem__ functions on purpose? Maybe the first
> one just needs to be removed.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: usern...@localhost

2010-03-19 Thread mdipierro
I will take a patch.

On Mar 19, 6:02 pm, Jonathan Lundell  wrote:
> I think IS_EMAIL should permit @localhost. Anybody disagree?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: PyPy 1.2 released!

2010-03-19 Thread mdipierro
Keep us posted. this is important!

On Mar 19, 6:13 pm, Joe  Barnhart  wrote:
> I have to say... WOW.   Just WOW.  The performance they're getting --
> even at this "post beta" stage of development -- is breathtaking.
> They've benchmarked Twisted on it and seen huge performance gains vs.
> CPython 2.6.2
>
> http://morepypy.blogspot.com/2010/03/hello.html
>
> I can't wait to download it on the mac tonight and see if web2py runs
> "out of the box".  Do we have any easy way of benching performance
> under PyPy?   I'm a little concerned about the "exec" method of
> executing code not "playing well" with the PyPy JIT.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread mdipierro
had a long day, can somebody provide an execute summary of all the
tests?

On Mar 19, 3:33 pm, Timothy Farrell  wrote:
> Thank you Kuba.  Would you mind re-running the 4x pound test like this also?
>
> On 3/19/2010 3:09 PM, Kuba Kucharski wrote:
>
> > One instance of each, with 10 calls in a connection as it is closer to
> > reallife scenario:
> > (numbers speak for themselves)
>
> > CHERRYPY:
>
> > r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server
> > 192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2
> > --num-conns=1 --num-calls=10
> > httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/
> > --send-buffer=4096 --recv-buffer=16384 --num-conns=1
> > --num-calls=10
>
> > Maximum connect burst length: 1
>
> > Total: connections 1 requests 10 replies 10 test-duration 
> > 67.659 s
>
> > Connection rate: 147.8 conn/s (6.8 ms/conn,<=1 concurrent connections)
> > Connection time [ms]: min 6.2 avg 6.8 max 10.5 median 6.5 stddev 0.2
> > Connection time [ms]: connect 0.1
> > Connection length [replies/conn]: 10.000
>
> > Request rate: 1478.0 req/s (0.7 ms/req)
> > Request size [B]: 64.0
>
> > Reply rate [replies/s]: min 1474.7 avg 1478.0 max 1480.3 stddev 2.0 (13 
> > samples)
> > Reply time [ms]: response 0.6 transfer 0.0
> > Reply size [B]: header 205.0 content 66.0 footer 2.0 (total 273.0)
> > Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0
>
> > CPU time [s]: user 25.67 system 41.99 (user 37.9% system 62.1% total 100.0%)
> > Net I/O: 483.5 KB/s (4.0*10^6 bps)
>
> > Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
> > Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0
>
> > ROCKET:
>
> > r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server
> > 192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2
> > --num-conns=1 --num-calls=10
> > httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/
> > --send-buffer=4096 --recv-buffer=16384 --num-conns=1
> > --num-calls=10
> > Maximum connect burst length: 1
>
> > Total: connections 1 requests 10 replies 10 test-duration 
> > 64.760 s
>
> > Connection rate: 154.4 conn/s (6.5 ms/conn,<=1 concurrent connections)
> > Connection time [ms]: min 5.9 avg 6.5 max 72.7 median 6.5 stddev 1.0
> > Connection time [ms]: connect 0.1
> > Connection length [replies/conn]: 10.000
>
> > Request rate: 1544.2 req/s (0.6 ms/req)
> > Request size [B]: 64.0
>
> > Reply rate [replies/s]: min 1526.9 avg 1544.2 max 1555.9 stddev 8.6 (12 
> > samples)
> > Reply time [ms]: response 0.6 transfer 0.0
> > Reply size [B]: header 216.0 content 66.0 footer 0.0 (total 282.0)
> > Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0
>
> > CPU time [s]: user 24.18 system 40.58 (user 37.3% system 62.7% total 100.0%)
> > Net I/O: 521.8 KB/s (4.3*10^6 bps)
>
> > Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
> > Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: About backward compatibility

2010-03-19 Thread mdipierro
Backward compatibility does not mean "forever" it means that we will
not break it in small steps. We will break in one big step by
releasing a new product, when/if there will a need for it. Like move
to 3.x in 2-3 years time. When that happens we will replace the form
system with a better one if a better one has been developed by then.

On Mar 19, 3:24 pm, stefaan  wrote:
> > I've just got to read that the yii framework folks share the same
> > oppinion as me about backward compatibility and the payoff to mantain it
> > for ever.
>
> Of course everyone is entitled to his/her own opinion, but I would
> like to point out that
> while maintaining backward compatibility in the long run can lead to
> some suboptimal code,
> not maintaining backward compatibility in my experience causes
> considerable additional
> stress for developers using your framework.
>
> Keeping backward compatiblity ensures that your users can upgrade
> to the newest version at any time, without fearing the extra time and
> effort needed to port to a new software architecture.
> Everyone that at some point started to use the framework therefore can
> keep benefiting from the latest and greatest features and fixes.
> The framework for your web application basically never becomes
> outdated/deprecated/... Support for it never has to be gradually
> phased out,
> leaving the early users in agony...

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Layout Plugin

2010-03-19 Thread mdipierro
The plugin should not touch your static files but only layout.html and
it should move your original views/layout.html into private/
layout.html

You should be able to recover cy

cp private/layout.html views/layout.html

On Mar 19, 10:09 am, Matthew McNaughton 
wrote:
> Greetings team,
> I recently tried to use the layout plugin, but my experience has been
> less than stellar. After installing the plug in, and choosing a design
> to use, I get a web2py site with only text and no color.
>
> While I would love to get the layout plugin to work, any design would be
> good at this point in time. I have tried clicking "Return to default" in
> the plug in, uninstalling the plug-in, overwriting the base.css etc with
> one from a default web2py also with no success.
>
> I also watching massimo's video on Vimeo but I haven't had much luck.
> Any help would be appreciated. Thank you all.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Does the pdf manual differ from the online official web2py book a lot?

2010-03-19 Thread mdipierro
I can do it but give a week or two.

On Mar 19, 9:44 am, Thadeus Burgess  wrote:
> Speaking of this. Massimo can we get a "latest update" feed for the
> online book, to make it easier to keep track of new things?
>
> -Thadeus
>
> On Fri, Mar 19, 2010 at 9:44 AM, Thadeus Burgess  
> wrote:
> > New web2py features added to the online book, so you will miss certain
> > things, since the PDF book is about a year old now, whereas the online
> > book is being added to and expanded.
>
> > -Thadeus
>
> > On Fri, Mar 19, 2010 at 8:12 AM, mdipierro  wrote:
> >> One month ago they were identical but the online one is a wiki so some
> >> users have improved it, but no major differences yet.
>
> >> On Mar 19, 3:37 am, zkingw  wrote:
> >>> Hi, all:
>
> >>> I came across web2py earlier this week, and I fall into love with it
> >>> right away, and decided to learn it as my very first python web
> >>> framework.
>
> >>> I got the pdf version of the manual in hand, already finished the
> >>> first two chapters, and move into the Core part, have to say that's
> >>> one of the best tutorial. My question is that does the pdf manual
> >>> differ from the online official book a lot? And what's the difference
> >>> between those two versions exactly? I want to stay with the pdf manual
> >>> as I can read it using my ebook reader which is really nice, but I
> >>> dont want missing the important stuff because the version difference.
>
> >>> thanks for your kindly advices.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "web2py-users" group.
> >> To post to this group, send email to web...@googlegroups.com.
> >> To unsubscribe from this group, send email to 
> >> web2py+unsubscr...@googlegroups.com.
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Possible bug in Field.__getslice__

2010-03-19 Thread mr.freeze
Correct me if I'm wrong but...

In Field.__getslice__, when 'start' is less than 0, pos0 is a string
but the function always tries to do 'int(pos0) + 1'
The function should also probably check if 'stop' is sys.maxint which
is what will be passed for things like [-4:]

Also, are there two __getitem__ functions on purpose? Maybe the first
one just needs to be removed.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: usern...@localhost

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 4:30 PM, Yarko Tymciurak wrote:

> On Mar 19, 6:02 pm, Jonathan Lundell  wrote:
>> I think IS_EMAIL should permit @localhost. Anybody disagree?
> 
> I can see your motivation (development), but do you need that?
> Would you also allow u...@127.0.0.1?   or u...@69.45.126.113 (I have
> no idea what that is)?

It's a Level3 address.

> 
> At first blush, it feels like you're opening a can of worms...

It's a fairly common convention for delivering mail to users on the local 
machine; you'll see eg 'r...@localhost' and the like. sendmail knows that it's 
for local delivery. (.localhost is also a legal tld, but that's another story.)

IP addresses generally, no.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: usern...@localhost

2010-03-19 Thread Yarko Tymciurak
On Mar 19, 6:02 pm, Jonathan Lundell  wrote:
> I think IS_EMAIL should permit @localhost. Anybody disagree?

I can see your motivation (development), but do you need that?
Would you also allow u...@127.0.0.1?   or u...@69.45.126.113 (I have
no idea what that is)?

At first blush, it feels like you're opening a can of worms...

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] PyPy 1.2 released!

2010-03-19 Thread Joe Barnhart
I have to say... WOW.   Just WOW.  The performance they're getting --
even at this "post beta" stage of development -- is breathtaking.
They've benchmarked Twisted on it and seen huge performance gains vs.
CPython 2.6.2

http://morepypy.blogspot.com/2010/03/hello.html

I can't wait to download it on the mac tonight and see if web2py runs
"out of the box".  Do we have any easy way of benching performance
under PyPy?   I'm a little concerned about the "exec" method of
executing code not "playing well" with the PyPy JIT.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: web2py beautification

2010-03-19 Thread Yarko Tymciurak
On Mar 19, 2:24 am, mdipierro  wrote:
> I played with ez-css (which I like) but yet it reminded why I used
> tables.

Yeah - the presence of tables in the layout really causes troubles!

> Here is my problem and I am sure it is just me being dumb. Say
> I want a header, a footer and two columns in between. I want the left
> column of fixed with (a menu, 200px) and a right column to foll the
> rest of the space (content). Because of the way it works (and most of
> these frameworks work the same way), the columns float to right
> therefore I must specifycontent before the menu. Hence I cannot find a
> way to make the menu fixed width and the content fill the rest of the
> space without messing up the alignment of the boxes. Can you do it?

If I understand you, I think this is pretty easy w/ ez-css.   I have
now done a few layouts w/ it in web2py (as of last night), and have
sent you an ez-css layout.html for "welcome" app (it uses the css
classes from base.css, but a few settings that were assigned to table
elements, I had to update / put elsewhere - base.css has minor
changes;  ez-plug.css remains stock).

There are probably other things that could be cleaned up in base.css,
but this was pretty easy (once I realized how to go about it).

- Yarko


>
> Massimo
>
> On Mar 18, 11:46 pm, Yarko Tymciurak 
> wrote:
>
> > On Mar 18, 10:31 pm, mdipierro  wrote:
>
> > > The problem I see is that it is too simple.
> > > sizeXofY does not seem to guarantee that all columns have the same
> > > lenght (ez-css does it).
> > > I like to have the menu column fixed width and the main column elastic
> > > and it does not do that (not sure if ez-css does).
>
> > I have installed ez-css to try out / play with...  it does do fixed
> > width + variable width columns:
>
> > In multiple ways, actually (depending on how you nest it);   
> > seehttp://www.ez-css.org/layouts
>
> > See module 2A, 2B, layout 2, layout 3, etc
>
> > Each of these use "ez-50", a 50% width element, or "ez-33", a 33%
> > width element.
>
> > ez-css encourages you to create your own width element if the pre-
> > defined ones don't "do it" for you - so, create a
> > ez-500px, and you'd have what you want.
>
> > This seems like a really clean, easily modifiable and "combinable"
> > package...  I'm going to play with it in the next few days to see how
> > my opinion holds up in use.
>
> > - Yarko
>
> > > On Mar 18, 8:59 pm, villas  wrote:
>
> > > > Ez-css seems like a good enough option,  but before making your mind
> > > > up, have a look at the simplicity of oocss.org/grids_docs.html (with
> > > > Firebug).  Oocss might give more possibilities,  but admittedly, is
> > > > heavier.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] usern...@localhost

2010-03-19 Thread Jonathan Lundell
I think IS_EMAIL should permit @localhost. Anybody disagree?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: substring comparison in GAE query

2010-03-19 Thread howesc
Thadeus,

i'm not mixing frameworks right now - web2py has been my exclusive
home for over a year now. :)  It also looks like there is some sort of
substring tools with some (all?) of the relational db's
http://groups.google.com/group/web2py/browse_thread/thread/eb8ce28b34fd0aa0/48bf0788ba899158?lnk=gst&q=substring#48bf0788ba899158
but i'm not using one of them today to test it out.  it's not in GAE.

thanks for the tips guys!  i'm just going to bite the bullet and make
the database upgrade that is the correct answer anyway.  fun with
updating code and testing!

cfh

On Mar 19, 1:33 pm, Thadeus Burgess  wrote:
> You must be thinking of another framework and mixing the two?
>
> I read every post and have not seen that.
>
> Perhaps you mean db(db.table.string.like("%.com")).select()
>
> -Thadeus
>
> On Fri, Mar 19, 2010 at 2:49 PM, howesc  wrote:
> > Hello,
>
> > I swear i saw a post in the last week about creating database queries
> > with substring syntax for filtering like:
> >  query = db(db.table.string_field[:4] == ".com")
>
> > but i can't find the post about that.  am i dreaming?  and does
> > something like this work on the Google App Engine?  I was trying it
> > but got an error:
>
> >  File "/home/cfhowes/clients/rockriver/source/web2py/gluon/sql.py",
> > line 2703, in __getslice__
> >    s = self._db._translator['substring'] % d
> > KeyError: 'substring'
>
> > Thanks,
>
> > Christian
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: problema con mysql y apache

2010-03-19 Thread Wes James
is your web2py set to the same user permissions as apache? I have had
problem also with web2py running one version of python and then under
apache running a different version of python  are they the same?

On Fri, Mar 19, 2010 at 3:33 PM, kike  wrote:
> the problem not is with web2py, the problem is in the apache web
> server, because web2py without apache work very good
>
> On 19 mar, 16:23, Wes James  wrote:
>> run web2py from command line and see that mysql shows as driver available
>>
>> mac osx translator:
>>
>> ejecute web2py de línea de comando y vea que el mysql muestra como
>> programa piloto disponible
>>
>> -wes
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: how to use GAE deferred

2010-03-19 Thread howesc
Hi all,

So i need to do an GAE bigtable upgrade today, and add a new field and
i need its value to be set properlyso i too want to do this.
Turns out deferred is not what we web2py people want.  just use the
taskqueue directly.  it's trivial (well i think it is, i have not
deployed yet, but it runs on dev_appserver):

in default.py add the following 2 methods:

def test():
from google.appengine.api.labs import taskqueue
taskqueue.add(url='/default/task', params={'key': "bob"})
return

def task():
logging.info("in da task")
logging.info(repr(request.vars))
logging.info("rec count: %d" % db(db.recording.id>0).count())
return

then, if you hit /default/test in your browser it will add a task to
the default queue - keep in mind that the default queue executes tasks
at 5 per second rate, create a separate queue if you want to configure
it more.  See TaskClass and QueueClass subsections of
http://code.google.com/appengine/docs/python/taskqueue/overview.html.
Then watch your logs (if using dev_appserver remember to tell the task
to run - access the default queue at 
http://127.0.0.1:8080/_ah/admin/tasks?queue=default).
Note that if you blindly copied my code and don't have a table named
recording then you'll probably get an exception.

important bits:
 - pass params to your taskqueue.add() call, they show up as request
vars.  free.  no pickling involved.  whoo-hooo
 - now that it's handled just like any other web request in web2py you
have the full environment at your disposal.  not sure about getting a
login or session to the queue call though.
 - i don't have to figure out how to get my db.py imported into a
module. :)

good luck!

Christian




On Mar 10, 6:10 am, Richard  wrote:
> didn't figure this out so have changed (rather awkwardly) to using
> cron.
> Would be interested to hear if anyone else has better luck.
>
> On Mar 10, 12:00 am, Richard  wrote:
>
> > I guess I could use gql directly to access the database, but I would
> > prefer to have a single syntax for accessing the database.
>
> > (controller of model -> controller or model)
>
> > On Mar 9, 10:25 pm, Richard  wrote:
>
> > > Actually it seems only module functions can be deferred. If I try
> > > deferring a controller of model function then I get this error:
> > > PicklingError: Can't pickle : it's not
> > > found as __main__.test
>
> > > However I need my deferred function to interact with the database. Any
> > > ideas??
>
> > > On Mar 8, 3:44 pm, Richard  wrote:
>
> > > > found they need to go in modules/models rather than controllers.
> > > > However one model function can'tdeferanother model function...
>
> > > > On Mar 8, 12:49 pm, waTR  wrote:
>
> > > > > I too am interested in this...
>
> > > > > On Mar 7, 2:44 pm, Richard  wrote:
>
> > > > > > I am adding some background work to my web2pyGAEapp with the
> > > > > > deferred 
> > > > > > library:http://code.google.com/appengine/articles/deferred.html
>
> > > > > > As the article suggests I have added this to app.yaml:
> > > > > > - url: /_ah/queue/deferred
> > > > > >     script: $PYTHON_LIB/google/appengine/ext/deferred/deferred.py
> > > > > >     login: admin
>
> > > > > > The article also says "You can't call a method in the request 
> > > > > > handler
> > > > > > module" - what does that correspond to in web2py?
>
> > > > > > Any other advice about using Deferred / Task Queues through web2py
> > > > > > would be welcome.
>
> > > > > > Richard
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: problema con mysql y apache

2010-03-19 Thread kike
the problem not is with web2py, the problem is in the apache web
server, because web2py without apache work very good

On 19 mar, 16:23, Wes James  wrote:
> run web2py from command line and see that mysql shows as driver available
>
> mac osx translator:
>
> ejecute web2py de línea de comando y vea que el mysql muestra como
> programa piloto disponible
>
> -wes

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: problema con mysql y apache

2010-03-19 Thread kike
yes all is in the same machine, how i now what version requires
apache, because the problem is whit it

On 19 mar, 16:19, Thadeus Burgess  wrote:
> This is on the same computer?
>
> Is the apache instance running the same version of python as you
> installed the driver ?
>
> traductor Google:
>
> Esto es en el mismo equipo?
>
> Es la instancia de Apache cuando se ejecuta la misma versión de Python
> como usted
> instalar el driver?
>
> -Thadeus
>
> On Fri, Mar 19, 2010 at 4:16 PM, kike  wrote:
> > yes i have installed python-mysqldb in my server, the problem come out
> > when i mounted my aplication in the apache web server, when i
> > develoment whith the basic web2py, "without apache server", i not have
> > these problem
>
> > On 19 mar, 16:10, Thadeus Burgess  wrote:
> >> Make sure that you have `python-mysqldb` installed on the server.
>
> >> traductor Google:
>
> >> Asegúrese de que tiene `python-MySQLdb` instalado en el servidor.
>
> >> -Thadeus
>
> >> On Fri, Mar 19, 2010 at 4:05 PM, kike  wrote:
> >> > te refieres a uno del apache en especifico, porque la aplicacion me
> >> > funcionaba de maravillas antes de ponerla en el apache, y para
> >> > realmente no se que invertarle para que funcione
>
> >> > On 19 mar, 15:48, Wes James  wrote:
> >> >> talvez no tienes un driver para mysql
>
> >> >> On Fri, Mar 19, 2010 at 2:31 PM, kike  
> >> >> wrote:
> >> >> > tengo una aplicacion terminada pero cuando la monto en el apache me
> >> >> > lanza el siguiente tiket: Cual es el problema
>
> >> >> > Traceback (most recent call last):
> >> >> >  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
> >> >> > restricted
> >> >> >  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
> >> >> > in 
> >> >> >    vulnerabilidades=DAL('mysql://root:r...@localhost/
> >> >> > sbdv',pool_size=20)
> >> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
> >> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
> >> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
> >> >> > _pool_connection
> >> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
> >> >> > NameError: global name 'MySQLdb' is not defined
>
> >> >> > --
> >> >> > You received this message because you are subscribed to the Google 
> >> >> > Groups "web2py-users" group.
> >> >> > To post to this group, send email to web...@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to 
> >> >> > web2py+unsubscr...@googlegroups.com.
> >> >> > For more options, visit this group 
> >> >> > athttp://groups.google.com/group/web2py?hl=en.
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "web2py-users" group.
> >> > To post to this group, send email to web...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > web2py+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: problema con mysql y apache

2010-03-19 Thread Wes James
run web2py from command line and see that mysql shows as driver available

mac osx translator:

ejecute web2py de línea de comando y vea que el mysql muestra como
programa piloto disponible


-wes

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: problema con mysql y apache

2010-03-19 Thread Thadeus Burgess
This is on the same computer?

Is the apache instance running the same version of python as you
installed the driver ?

traductor Google:

Esto es en el mismo equipo?

Es la instancia de Apache cuando se ejecuta la misma versión de Python
como usted
instalar el driver?

-Thadeus





On Fri, Mar 19, 2010 at 4:16 PM, kike  wrote:
> yes i have installed python-mysqldb in my server, the problem come out
> when i mounted my aplication in the apache web server, when i
> develoment whith the basic web2py, "without apache server", i not have
> these problem
>
> On 19 mar, 16:10, Thadeus Burgess  wrote:
>> Make sure that you have `python-mysqldb` installed on the server.
>>
>> traductor Google:
>>
>> Asegúrese de que tiene `python-MySQLdb` instalado en el servidor.
>>
>> -Thadeus
>>
>> On Fri, Mar 19, 2010 at 4:05 PM, kike  wrote:
>> > te refieres a uno del apache en especifico, porque la aplicacion me
>> > funcionaba de maravillas antes de ponerla en el apache, y para
>> > realmente no se que invertarle para que funcione
>>
>> > On 19 mar, 15:48, Wes James  wrote:
>> >> talvez no tienes un driver para mysql
>>
>> >> On Fri, Mar 19, 2010 at 2:31 PM, kike  
>> >> wrote:
>> >> > tengo una aplicacion terminada pero cuando la monto en el apache me
>> >> > lanza el siguiente tiket: Cual es el problema
>>
>> >> > Traceback (most recent call last):
>> >> >  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
>> >> > restricted
>> >> >  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
>> >> > in 
>> >> >    vulnerabilidades=DAL('mysql://root:r...@localhost/
>> >> > sbdv',pool_size=20)
>> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
>> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
>> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
>> >> > _pool_connection
>> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
>> >> > NameError: global name 'MySQLdb' is not defined
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google 
>> >> > Groups "web2py-users" group.
>> >> > To post to this group, send email to web...@googlegroups.com.
>> >> > To unsubscribe from this group, send email to 
>> >> > web2py+unsubscr...@googlegroups.com.
>> >> > For more options, visit this group 
>> >> > athttp://groups.google.com/group/web2py?hl=en.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "web2py-users" group.
>> > To post to this group, send email to web...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > web2py+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: problema con mysql y apache

2010-03-19 Thread kike
yes i have installed python-mysqldb in my server, the problem come out
when i mounted my aplication in the apache web server, when i
develoment whith the basic web2py, "without apache server", i not have
these problem

On 19 mar, 16:10, Thadeus Burgess  wrote:
> Make sure that you have `python-mysqldb` installed on the server.
>
> traductor Google:
>
> Asegúrese de que tiene `python-MySQLdb` instalado en el servidor.
>
> -Thadeus
>
> On Fri, Mar 19, 2010 at 4:05 PM, kike  wrote:
> > te refieres a uno del apache en especifico, porque la aplicacion me
> > funcionaba de maravillas antes de ponerla en el apache, y para
> > realmente no se que invertarle para que funcione
>
> > On 19 mar, 15:48, Wes James  wrote:
> >> talvez no tienes un driver para mysql
>
> >> On Fri, Mar 19, 2010 at 2:31 PM, kike  wrote:
> >> > tengo una aplicacion terminada pero cuando la monto en el apache me
> >> > lanza el siguiente tiket: Cual es el problema
>
> >> > Traceback (most recent call last):
> >> >  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
> >> > restricted
> >> >  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
> >> > in 
> >> >    vulnerabilidades=DAL('mysql://root:r...@localhost/
> >> > sbdv',pool_size=20)
> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
> >> > _pool_connection
> >> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
> >> > NameError: global name 'MySQLdb' is not defined
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "web2py-users" group.
> >> > To post to this group, send email to web...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > web2py+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: problema con mysql y apache

2010-03-19 Thread Thadeus Burgess
Make sure that you have `python-mysqldb` installed on the server.

traductor Google:

Asegúrese de que tiene `python-MySQLdb` instalado en el servidor.


-Thadeus





On Fri, Mar 19, 2010 at 4:05 PM, kike  wrote:
> te refieres a uno del apache en especifico, porque la aplicacion me
> funcionaba de maravillas antes de ponerla en el apache, y para
> realmente no se que invertarle para que funcione
>
> On 19 mar, 15:48, Wes James  wrote:
>> talvez no tienes un driver para mysql
>>
>> On Fri, Mar 19, 2010 at 2:31 PM, kike  wrote:
>> > tengo una aplicacion terminada pero cuando la monto en el apache me
>> > lanza el siguiente tiket: Cual es el problema
>>
>> > Traceback (most recent call last):
>> >  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
>> > restricted
>> >  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
>> > in 
>> >    vulnerabilidades=DAL('mysql://root:r...@localhost/
>> > sbdv',pool_size=20)
>> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
>> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
>> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
>> > _pool_connection
>> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
>> > NameError: global name 'MySQLdb' is not defined
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "web2py-users" group.
>> > To post to this group, send email to web...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > web2py+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: problema con mysql y apache

2010-03-19 Thread kike
te refieres a uno del apache en especifico, porque la aplicacion me
funcionaba de maravillas antes de ponerla en el apache, y para
realmente no se que invertarle para que funcione

On 19 mar, 15:48, Wes James  wrote:
> talvez no tienes un driver para mysql
>
> On Fri, Mar 19, 2010 at 2:31 PM, kike  wrote:
> > tengo una aplicacion terminada pero cuando la monto en el apache me
> > lanza el siguiente tiket: Cual es el problema
>
> > Traceback (most recent call last):
> >  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
> > restricted
> >  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
> > in 
> >    vulnerabilidades=DAL('mysql://root:r...@localhost/
> > sbdv',pool_size=20)
> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
> > _pool_connection
> >  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
> > NameError: global name 'MySQLdb' is not defined
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] substring comparison in GAE query

2010-03-19 Thread Wes James
yeh, I guess you can make some work arounds :)

On Fri, Mar 19, 2010 at 2:59 PM, Thadeus Burgess  wrote:
> You *can*, but not natively.
>
> http://web2py.com/AlterEgo/default/show/248
>
> rows = db(buyer.id>0).select().find(lambda row:row.name.startswith('C'))
>
> -Thadeus
>
>
>
>
>
> On Fri, Mar 19, 2010 at 3:53 PM, Wes James  wrote:
>> You can't use "like" on gae.
>>
>> On Fri, Mar 19, 2010 at 2:33 PM, Thadeus Burgess  
>> wrote:
>>> You must be thinking of another framework and mixing the two?
>>>
>>> I read every post and have not seen that.
>>>
>>> Perhaps you mean db(db.table.string.like("%.com")).select()
>>>
>>> -Thadeus
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] substring comparison in GAE query

2010-03-19 Thread Thadeus Burgess
You *can*, but not natively.

http://web2py.com/AlterEgo/default/show/248

rows = db(buyer.id>0).select().find(lambda row:row.name.startswith('C'))

-Thadeus





On Fri, Mar 19, 2010 at 3:53 PM, Wes James  wrote:
> You can't use "like" on gae.
>
> On Fri, Mar 19, 2010 at 2:33 PM, Thadeus Burgess  
> wrote:
>> You must be thinking of another framework and mixing the two?
>>
>> I read every post and have not seen that.
>>
>> Perhaps you mean db(db.table.string.like("%.com")).select()
>>
>> -Thadeus
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] substring comparison in GAE query

2010-03-19 Thread Wes James
You can't use "like" on gae.

On Fri, Mar 19, 2010 at 2:33 PM, Thadeus Burgess  wrote:
> You must be thinking of another framework and mixing the two?
>
> I read every post and have not seen that.
>
> Perhaps you mean db(db.table.string.like("%.com")).select()
>
> -Thadeus
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] problema con mysql y apache

2010-03-19 Thread Wes James
talvez no tienes un driver para mysql

On Fri, Mar 19, 2010 at 2:31 PM, kike  wrote:
> tengo una aplicacion terminada pero cuando la monto en el apache me
> lanza el siguiente tiket: Cual es el problema
>
>
>
> Traceback (most recent call last):
>  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
> restricted
>  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
> in 
>    vulnerabilidades=DAL('mysql://root:r...@localhost/
> sbdv',pool_size=20)
>  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
>  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
>  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
> _pool_connection
>  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
> NameError: global name 'MySQLdb' is not defined
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] substring comparison in GAE query

2010-03-19 Thread Thadeus Burgess
You must be thinking of another framework and mixing the two?

I read every post and have not seen that.

Perhaps you mean db(db.table.string.like("%.com")).select()

-Thadeus





On Fri, Mar 19, 2010 at 2:49 PM, howesc  wrote:
> Hello,
>
> I swear i saw a post in the last week about creating database queries
> with substring syntax for filtering like:
>  query = db(db.table.string_field[:4] == ".com")
>
> but i can't find the post about that.  am i dreaming?  and does
> something like this work on the Google App Engine?  I was trying it
> but got an error:
>
>  File "/home/cfhowes/clients/rockriver/source/web2py/gluon/sql.py",
> line 2703, in __getslice__
>    s = self._db._translator['substring'] % d
> KeyError: 'substring'
>
> Thanks,
>
> Christian
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Timothy Farrell

Thank you Kuba.  Would you mind re-running the 4x pound test like this also?

On 3/19/2010 3:09 PM, Kuba Kucharski wrote:

One instance of each, with 10 calls in a connection as it is closer to
reallife scenario:
(numbers speak for themselves)


CHERRYPY:

r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server
192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2
--num-conns=1 --num-calls=10
httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/
--send-buffer=4096 --recv-buffer=16384 --num-conns=1
--num-calls=10

Maximum connect burst length: 1

Total: connections 1 requests 10 replies 10 test-duration 67.659 s

Connection rate: 147.8 conn/s (6.8 ms/conn,<=1 concurrent connections)
Connection time [ms]: min 6.2 avg 6.8 max 10.5 median 6.5 stddev 0.2
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 10.000

Request rate: 1478.0 req/s (0.7 ms/req)
Request size [B]: 64.0

Reply rate [replies/s]: min 1474.7 avg 1478.0 max 1480.3 stddev 2.0 (13 samples)
Reply time [ms]: response 0.6 transfer 0.0
Reply size [B]: header 205.0 content 66.0 footer 2.0 (total 273.0)
Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0

CPU time [s]: user 25.67 system 41.99 (user 37.9% system 62.1% total 100.0%)
Net I/O: 483.5 KB/s (4.0*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0


ROCKET:

r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server
192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2
--num-conns=1 --num-calls=10
httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/
--send-buffer=4096 --recv-buffer=16384 --num-conns=1
--num-calls=10
Maximum connect burst length: 1

Total: connections 1 requests 10 replies 10 test-duration 64.760 s

Connection rate: 154.4 conn/s (6.5 ms/conn,<=1 concurrent connections)
Connection time [ms]: min 5.9 avg 6.5 max 72.7 median 6.5 stddev 1.0
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 10.000

Request rate: 1544.2 req/s (0.6 ms/req)
Request size [B]: 64.0

Reply rate [replies/s]: min 1526.9 avg 1544.2 max 1555.9 stddev 8.6 (12 samples)
Reply time [ms]: response 0.6 transfer 0.0
Reply size [B]: header 216.0 content 66.0 footer 0.0 (total 282.0)
Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0

CPU time [s]: user 24.18 system 40.58 (user 37.3% system 62.7% total 100.0%)
Net I/O: 521.8 KB/s (4.3*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

   


--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] problema con mysql y apache

2010-03-19 Thread kike
tengo una aplicacion terminada pero cuando la monto en el apache me
lanza el siguiente tiket: Cual es el problema



Traceback (most recent call last):
  File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
restricted
  File "/home/www-data/web2py/applications/SBDV/models/db.py", line 3,
in 
vulnerabilidades=DAL('mysql://root:r...@localhost/
sbdv',pool_size=20)
  File "/home/kike/sbdv/web2py/gluon/sql.py", line 3783, in DAL
  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in __init__
  File "/home/kike/sbdv/web2py/gluon/sql.py", line 840, in
_pool_connection
  File "/home/kike/sbdv/web2py/gluon/sql.py", line 919, in 
NameError: global name 'MySQLdb' is not defined

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Thadeus Burgess
The whole UI paradigm is a pain, regardless of what programming
language or platform. Windows Forms makes it easy, but still
archaic.

-Thadeus





On Fri, Mar 19, 2010 at 2:41 PM, Jonathan Lundell  wrote:
> On Mar 19, 2010, at 11:18 AM, Thadeus Burgess wrote:
>
>> Maybe the next version of CSS... but as long as IE is around, growth
>> of web standards will always be stunted.
>
> Not CSS3, anyway.
>
> I'm doubtful anyway, since CSS is so heavily embedded in browsers. I think 
> we're stuck with the basic model.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: About backward compatibility

2010-03-19 Thread stefaan
> I've just got to read that the yii framework folks share the same
> oppinion as me about backward compatibility and the payoff to mantain it
> for ever.

Of course everyone is entitled to his/her own opinion, but I would
like to point out that
while maintaining backward compatibility in the long run can lead to
some suboptimal code,
not maintaining backward compatibility in my experience causes
considerable additional
stress for developers using your framework.

Keeping backward compatiblity ensures that your users can upgrade
to the newest version at any time, without fearing the extra time and
effort needed to port to a new software architecture.
Everyone that at some point started to use the framework therefore can
keep benefiting from the latest and greatest features and fixes.
The framework for your web application basically never becomes
outdated/deprecated/... Support for it never has to be gradually
phased out,
leaving the early users in agony...





-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Kuba Kucharski
One instance of each, with 10 calls in a connection as it is closer to
reallife scenario:
(numbers speak for themselves)


CHERRYPY:

r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server
192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2
--num-conns=1 --num-calls=10
httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/
--send-buffer=4096 --recv-buffer=16384 --num-conns=1
--num-calls=10

Maximum connect burst length: 1

Total: connections 1 requests 10 replies 10 test-duration 67.659 s

Connection rate: 147.8 conn/s (6.8 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 6.2 avg 6.8 max 10.5 median 6.5 stddev 0.2
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 10.000

Request rate: 1478.0 req/s (0.7 ms/req)
Request size [B]: 64.0

Reply rate [replies/s]: min 1474.7 avg 1478.0 max 1480.3 stddev 2.0 (13 samples)
Reply time [ms]: response 0.6 transfer 0.0
Reply size [B]: header 205.0 content 66.0 footer 2.0 (total 273.0)
Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0

CPU time [s]: user 25.67 system 41.99 (user 37.9% system 62.1% total 100.0%)
Net I/O: 483.5 KB/s (4.0*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0


ROCKET:

r...@kubatron:/home/kuba/httperf-0.9.0/src# ./httperf --hog --server
192.168.0.1 --port=8000 ==uri=/vae/default/benchmark2
--num-conns=1 --num-calls=10
httperf --hog --client=0/1 --server=192.168.0.1 --port=8000 --uri=/
--send-buffer=4096 --recv-buffer=16384 --num-conns=1
--num-calls=10
Maximum connect burst length: 1

Total: connections 1 requests 10 replies 10 test-duration 64.760 s

Connection rate: 154.4 conn/s (6.5 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 5.9 avg 6.5 max 72.7 median 6.5 stddev 1.0
Connection time [ms]: connect 0.1
Connection length [replies/conn]: 10.000

Request rate: 1544.2 req/s (0.6 ms/req)
Request size [B]: 64.0

Reply rate [replies/s]: min 1526.9 avg 1544.2 max 1555.9 stddev 8.6 (12 samples)
Reply time [ms]: response 0.6 transfer 0.0
Reply size [B]: header 216.0 content 66.0 footer 0.0 (total 282.0)
Reply status: 1xx=0 2xx=0 3xx=10 4xx=0 5xx=0

CPU time [s]: user 24.18 system 40.58 (user 37.3% system 62.7% total 100.0%)
Net I/O: 521.8 KB/s (4.3*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] substring comparison in GAE query

2010-03-19 Thread howesc
Hello,

I swear i saw a post in the last week about creating database queries
with substring syntax for filtering like:
  query = db(db.table.string_field[:4] == ".com")

but i can't find the post about that.  am i dreaming?  and does
something like this work on the Google App Engine?  I was trying it
but got an error:

  File "/home/cfhowes/clients/rockriver/source/web2py/gluon/sql.py",
line 2703, in __getslice__
s = self._db._translator['substring'] % d
KeyError: 'substring'

Thanks,

Christian

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: best web frameworks

2010-03-19 Thread Alex Fanjul

actually it doesnt help too much...was curiosity... :-)

El 19/03/2010 18:46, selecta escribió:

hmmm, what do I learn from that? What should I use they are all the
same (oh yes different licenses and dependencies on different py
versions) or is this comparision pointless? Confusion o_O

On Mar 19, 12:53 pm, Alex Fanjul  wrote:
   

FYI:http://www.bestwebframeworks.com/python/
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.comwww.mhproject.org
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 11:18 AM, Thadeus Burgess wrote:

> Maybe the next version of CSS... but as long as IE is around, growth
> of web standards will always be stunted.

Not CSS3, anyway. 

I'm doubtful anyway, since CSS is so heavily embedded in browsers. I think 
we're stuck with the basic model.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Vasile Ermicioi
I would add a vote for Rocket.

A few thoughts about:
- rocket is developed inside our community, that means more control over it:
feedback, contributions etc
- still young, that means  it will be optimized :) I believe that Tim and
others will do so
- one file

And even if cherrypy is only a bit faster than Rocket (but is it?) I don't
see in that a reason to stay on cherrypy - most of the time is not on web
server response but on the framework and code itself

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread Thadeus Burgess
The reason is because the content type is encoded as Text not HTML.
Without the proper meta information sent to the SMTP server, emails
will not display correctly.

Use the following class lined out in the wiki, works like a charm.

http://wiki.web2py.com/Sending_Email_with_Plain_Text_HTML_Versions_plus_Attachments


-Thadeus





On Fri, Mar 19, 2010 at 1:30 PM, Alexandre Andrade
 wrote:
> the trick is that
>
> message is first text, then html
>
> mail.send(to=[recipient],subject='Controleer uw adresgegevens in
> Fitwise',message=message)
>
> will result in a text message.
>
> to render as html, is :
>
> mail.send(to=[recipient],subject='Controleer uw adresgegevens in
> Fitwise',message=[None,message])
>
>
>
>
> 2010/3/19 DenesL 
>>
>> Annet,
>> maybe this will help
>> http://groups.google.com/g/4247fb7b/t/4b6d3b0c8a822c83/d/7964e5b019d1c3d9
>>
>>
>> On Mar 19, 12:49 pm, annet  wrote:
>> > In my application all functions related to sending mail from it work.
>> > The main function reads like:
>> >
>> > def send_mail():
>> >
>> > nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf)
>> >     for nfa in nfas:
>> >         context=dict(nfa=nfa)
>> >         message=response.render('clublocatormail/
>> > send_mail.html',context)
>> >         recipient=nfa.adres
>> >         mail.send(to=[recipient],subject='Controleer uw adresgegevens
>> > in Fitwise',message=message)
>> >     return True
>> >
>> > The send_mail.html view reads like (I removed the irrelevant parts):
>> >
>> > 
>> > 
>> >    
>> >    Template - Single Column
>> > 
>> > 
>> >       body {
>> >          background-color: #ee;
>> >       }
>> > 
>> > 
>> > > > class="bg1">
>> >    
>> >       
>> >          > > class="bg2">
>> >             
>> >                
>> >                   {{if not request.function=='browser_version':}}
>> >                       Having trouble viewing this email?
>> > {{=A('View it in your browser',
>> >
>> > _href="{{=URL(r=request,a='mock_crm',c='clublocatormail',f='browser_version',args=[nfa.bedrijf])")}}.> > h1>
>> >                   {{pass}}
>> >                
>> >             
>> >             
>> >                
>> >                   
>> >                
>> >             
>> >             
>> >                
>> >                   > > cellpadding="0">
>> >                      
>> >                         
>> >                            
>> >                            > > src="{{=URL(r=request,c='static',f='template/hr.gif')}}" alt="Header"
>> > width="560" height="3" />
>> >                            {{=nfa.bedrijf}}
>> >                            {{=nfa.adres}}> > p>
>> >                            
>> >                         
>> >                      
>> >                   
>> >                
>> >             
>> >             
>> >                > > height="61">
>> >                   
>> >                
>> >             
>> >          
>> >       
>> >    
>> > 
>> > 
>> > 
>> >
>> > I based this code on this
>> > article:http://articles.sitepoint.com/article/code-html-email-newsletters
>> > and the templates referred to. I had hoped the view would display
>> > without trouble, but it doesn't. In all mail clients and web based
>> > apps, it displays as plain text, so the html is not rendered. I have
>> > been trying to find out why for two days now, and hope one of you can
>> > come to my rescue.
>> >
>> > Kind regards,
>> >
>> > Annet.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/web2py?hl=en.
>>
>
>
>
> --
> Atenciosamente
>
> --
> =
> Alexandre Andrade
> Hipercenter.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread Alexandre Andrade
the trick is that

message is first text, then html

mail.send(to=[recipient],subject='Controleer uw adresgegevens in
Fitwise',message=message)

will result in a text message.

to render as html, is :

mail.send(to=[recipient],subject='Controleer uw adresgegevens in
Fitwise',message=[None,message])




2010/3/19 DenesL 

> Annet,
> maybe this will help
> http://groups.google.com/g/4247fb7b/t/4b6d3b0c8a822c83/d/7964e5b019d1c3d9
>
>
> On Mar 19, 12:49 pm, annet  wrote:
> > In my application all functions related to sending mail from it work.
> > The main function reads like:
> >
> > def send_mail():
> >
> > nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf)
> > for nfa in nfas:
> > context=dict(nfa=nfa)
> > message=response.render('clublocatormail/
> > send_mail.html',context)
> > recipient=nfa.adres
> > mail.send(to=[recipient],subject='Controleer uw adresgegevens
> > in Fitwise',message=message)
> > return True
> >
> > The send_mail.html view reads like (I removed the irrelevant parts):
> >
> > 
> > 
> >
> >Template - Single Column
> > 
> > 
> >   body {
> >  background-color: #ee;
> >   }
> > 
> > 
> >  > class="bg1">
> >
> >   
> >   > class="bg2">
> > 
> >
> >   {{if not request.function=='browser_version':}}
> >   Having trouble viewing this email?
> > {{=A('View it in your browser',
> >
> _href="{{=URL(r=request,a='mock_crm',c='clublocatormail',f='browser_version',args=[nfa.bedrijf])")}}. > h1>
> >   {{pass}}
> >
> > 
> > 
> >
> >   
> >
> > 
> > 
> >
> >> cellpadding="0">
> >  
> > 
> >
> > > src="{{=URL(r=request,c='static',f='template/hr.gif')}}" alt="Header"
> > width="560" height="3" />
> >{{=nfa.bedrijf}}
> >{{=nfa.adres}} > p>
> >
> > 
> >  
> >   
> >
> > 
> > 
> > > height="61">
> >   
> >
> > 
> >  
> >   
> >
> > 
> > 
> > 
> >
> > I based this code on this article:
> http://articles.sitepoint.com/article/code-html-email-newsletters
> > and the templates referred to. I had hoped the view would display
> > without trouble, but it doesn't. In all mail clients and web based
> > apps, it displays as plain text, so the html is not rendered. I have
> > been trying to find out why for two days now, and hope one of you can
> > come to my rescue.
> >
> > Kind regards,
> >
> > Annet.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>


-- 
Atenciosamente

-- 
=
Alexandre Andrade
Hipercenter.com

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Thadeus Burgess
Maybe the next version of CSS... but as long as IE is around, growth
of web standards will always be stunted.

-Thadeus





On Fri, Mar 19, 2010 at 12:59 PM, Jonathan Lundell  wrote:
> On Mar 19, 2010, at 8:46 AM, Thadeus Burgess wrote:
>
>> Its really not hard, and the box model is not that bad, its just
>> confusing and most don't know how to use it properly.
>
> That's not a good sign.
>
>>
>> http://www.stubbornella.org/content/2009/02/12/css-doesn%E2%80%99t-suck-you%E2%80%99re-just-doing-it-wrong/
>>
>> Here are perfect examples of the box model working correctly.
>>
>> http://matthewjamestaylor.com/blog/perfect-3-column.htm
>> http://www.alistapart.com/articles/holygrail
>
> I agree that MJT's example is especially nice. But it also makes my point. 
> His simple 3-column layout has 160 lines of CSS, not all of them for layout, 
> but the lion's share. And that doesn't count the html that makes it go.
>
> Compare that to the same thing with a table.
>
> And I'm not arguing for tables, particularly, just that CSS should have made 
> our job easier, not harder.
>
> Example: I should be able to say, for that kind of layout:
>
> Give me a box for the page.
>
> Nest three boxes inside it, on top of each other, each the full width of the 
> enclosing box.
>
> In the middle of those boxes, nest three more, but left to right.
>
> Let me give each box a name.
>
> Let me constrain each box's horizontal and vertical extent based on any 
> combination of content, container, percentages and pixels that isn't 
> self-contradictory. Let the model understand the word "center" in both 
> dimensions.
>
> (Now, if on top of that model I want to define more boxes that float around, 
> etc, fine, no objection. But it needn't be part of my base layout.)
>
> And now let me, separate from that description, pour my content into named 
> boxes.
>
> When I first heard of CSS, way back whenever, that's kind of what I imagined 
> it'd be like, from the early glowing descriptions. Boy, was I surprised.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 8:46 AM, Thadeus Burgess wrote:

> Its really not hard, and the box model is not that bad, its just
> confusing and most don't know how to use it properly.

That's not a good sign.

> 
> http://www.stubbornella.org/content/2009/02/12/css-doesn%E2%80%99t-suck-you%E2%80%99re-just-doing-it-wrong/
> 
> Here are perfect examples of the box model working correctly.
> 
> http://matthewjamestaylor.com/blog/perfect-3-column.htm
> http://www.alistapart.com/articles/holygrail

I agree that MJT's example is especially nice. But it also makes my point. His 
simple 3-column layout has 160 lines of CSS, not all of them for layout, but 
the lion's share. And that doesn't count the html that makes it go.

Compare that to the same thing with a table.

And I'm not arguing for tables, particularly, just that CSS should have made 
our job easier, not harder.

Example: I should be able to say, for that kind of layout:

Give me a box for the page.

Nest three boxes inside it, on top of each other, each the full width of the 
enclosing box.

In the middle of those boxes, nest three more, but left to right.

Let me give each box a name.

Let me constrain each box's horizontal and vertical extent based on any 
combination of content, container, percentages and pixels that isn't 
self-contradictory. Let the model understand the word "center" in both 
dimensions.

(Now, if on top of that model I want to define more boxes that float around, 
etc, fine, no objection. But it needn't be part of my base layout.)

And now let me, separate from that description, pour my content into named 
boxes.

When I first heard of CSS, way back whenever, that's kind of what I imagined 
it'd be like, from the early glowing descriptions. Boy, was I surprised.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread DenesL
Annet,
maybe this will help
http://groups.google.com/g/4247fb7b/t/4b6d3b0c8a822c83/d/7964e5b019d1c3d9


On Mar 19, 12:49 pm, annet  wrote:
> In my application all functions related to sending mail from it work.
> The main function reads like:
>
> def send_mail():
>
> nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf)
>     for nfa in nfas:
>         context=dict(nfa=nfa)
>         message=response.render('clublocatormail/
> send_mail.html',context)
>         recipient=nfa.adres
>         mail.send(to=[recipient],subject='Controleer uw adresgegevens
> in Fitwise',message=message)
>     return True
>
> The send_mail.html view reads like (I removed the irrelevant parts):
>
> 
> 
>    
>    Template - Single Column
> 
> 
>       body {
>          background-color: #ee;
>       }
> 
> 
>  class="bg1">
>    
>       
>           class="bg2">
>             
>                
>                   {{if not request.function=='browser_version':}}
>                       Having trouble viewing this email?
> {{=A('View it in your browser',
> _href="{{=URL(r=request,a='mock_crm',c='clublocatormail',f='browser_version',args=[nfa.bedrijf])")}}. h1>
>                   {{pass}}
>                
>             
>             
>                
>                   
>                
>             
>             
>                
>                    cellpadding="0">
>                      
>                         
>                            
>                             src="{{=URL(r=request,c='static',f='template/hr.gif')}}" alt="Header"
> width="560" height="3" />
>                            {{=nfa.bedrijf}}
>                            {{=nfa.adres}} p>
>                            
>                         
>                      
>                   
>                
>             
>             
>                 height="61">
>                   
>                
>             
>          
>       
>    
> 
> 
> 
>
> I based this code on this 
> article:http://articles.sitepoint.com/article/code-html-email-newsletters
> and the templates referred to. I had hoped the view would display
> without trouble, but it doesn't. In all mail clients and web based
> apps, it displays as plain text, so the html is not rendered. I have
> been trying to find out why for two days now, and hope one of you can
> come to my rescue.
>
> Kind regards,
>
> Annet.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: best web frameworks

2010-03-19 Thread Thadeus Burgess
quick! everyone, comment good things about web2py!

-Thadeus





On Fri, Mar 19, 2010 at 12:46 PM, selecta  wrote:
> hmmm, what do I learn from that? What should I use they are all the
> same (oh yes different licenses and dependencies on different py
> versions) or is this comparision pointless? Confusion o_O
>
> On Mar 19, 12:53 pm, Alex Fanjul  wrote:
>> FYI:http://www.bestwebframeworks.com/python/
>> --
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.comwww.mhproject.org
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: best web frameworks

2010-03-19 Thread selecta
hmmm, what do I learn from that? What should I use they are all the
same (oh yes different licenses and dependencies on different py
versions) or is this comparision pointless? Confusion o_O

On Mar 19, 12:53 pm, Alex Fanjul  wrote:
> FYI:http://www.bestwebframeworks.com/python/
> --
> Alejandro Fanjul Fdez.
> alex.fan...@gmail.comwww.mhproject.org

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py api search - edit_area plugin

2010-03-19 Thread Wes James
On Fri, Mar 19, 2010 at 11:34 AM, Thadeus Burgess  wrote:
> You could do a
>
> def install():
>   if db(db.table.id > 0).count() == 0:
>      db.table.insert(record1)
>      db.table.insert(record2)
>   if db(db.table2.id > 0).count() == 0:
>      db.table2.insert(record1)
>
> install()
>
> -Thadeus
>
>

Thadeus, thx.

I'm also looking at what might be the best way to parse the current
code base (doc strings) or epydocs and put that info in to the db.

-wes

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py api search - edit_area plugin

2010-03-19 Thread Thadeus Burgess
You could do a

def install():
   if db(db.table.id > 0).count() == 0:
  db.table.insert(record1)
  db.table.insert(record2)
   if db(db.table2.id > 0).count() == 0:
  db.table2.insert(record1)

install()

-Thadeus





On Fri, Mar 19, 2010 at 12:22 PM, Wes James  wrote:
> Here is how to get "web2py api search" plugin to work:
>
> 1. unzip web2py_api_srch.zip in to
> web2py/applications/admin/static/edit_area/plugins
> 2. unzip databases.zip in to web2py/applications/admin
> 3. add the following to web2py/applications/admin/models/0.py :
>
> db = DAL('sqlite://storage.sqlite')
>
> db.define_table(
>    'apis',
>    Field('api'),
>    Field('info')
>    )
>
> 4. Makes changes to the end of the editAreaLoader.init in
> web2py/applications/admin/views/default/edit.html:
>
> , end_toolbar: "web2py_api_srch_but" {{if filetype=='html':}},plugins:
> "web2py_api_srch,zencoding"{{else:}},plugins:
> "web2py_api_srch"{{pass}}
>
> 5.  Add the contents of controller.txt (apis function) to
> web2py/applications/admin/controllers/default.py
>
> ok - instead of doing all the attachments above, I'm just attaching
> admin.zip where I deleted everything but the necessary files.
>
> Anyone have any ideas on the db structure or how to populate it?
>
> -wes
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Using the Template System to Generate Emails

2010-03-19 Thread annet
In my application all functions related to sending mail from it work.
The main function reads like:

def send_mail():
 
nfas=db(db.nfa.nfatype==4).select(db.nfa.ALL,orderby=db.nfa.bedrijf)
for nfa in nfas:
context=dict(nfa=nfa)
message=response.render('clublocatormail/
send_mail.html',context)
recipient=nfa.adres
mail.send(to=[recipient],subject='Controleer uw adresgegevens
in Fitwise',message=message)
return True

The send_mail.html view reads like (I removed the irrelevant parts):




   
   Template - Single Column


  body {
 background-color: #ee;
  }



   
  
 

   
  {{if not request.function=='browser_version':}}
  Having trouble viewing this email?
{{=A('View it in your browser',
_href="{{=URL(r=request,a='mock_crm',c='clublocatormail',f='browser_version',args=[nfa.bedrijf])")}}.
  {{pass}}
   


   
  
   


   
  
 

   
   
   {{=nfa.bedrijf}}
   {{=nfa.adres}}
   

 
  
   


   
  
   

 
  
   





I based this code on this article: 
http://articles.sitepoint.com/article/code-html-email-newsletters
and the templates referred to. I had hoped the view would display
without trouble, but it doesn't. In all mail clients and web based
apps, it displays as plain text, so the html is not rendered. I have
been trying to find out why for two days now, and hope one of you can
come to my rescue.

Kind regards,

Annet.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] legacy databases

2010-03-19 Thread Thadeus Burgess
You need to define your tables in web2py. As of yet there is no db
introspection for db.

db.define_table('tablename', *Fields)

There is also a thing called "keyedtables" which is for legacy databases.

-Thadeus





On Fri, Mar 19, 2010 at 10:44 AM, pacopyc  wrote:
> Hi, I need to develope a web application with legacy database
> (Oracle). Database's tables have an auto increment field (id) and then
> this is ok. I tried to build a new application and I set database
> connection (db.py). No error (connection string is ok) but if I try to
> use "appadmin" application I can't see database's tables. Can I build
> models from tables automatically? Is this the problem? What can I do?
> Anything similar inspectdb of Django? Also with Rails no problem, I
> don't understand ... can you help me?
>
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] legacy databases

2010-03-19 Thread pacopyc
Hi, I need to develope a web application with legacy database
(Oracle). Database's tables have an auto increment field (id) and then
this is ok. I tried to build a new application and I set database
connection (db.py). No error (connection string is ok) but if I try to
use "appadmin" application I can't see database's tables. Can I build
models from tables automatically? Is this the problem? What can I do?
Anything similar inspectdb of Django? Also with Rails no problem, I
don't understand ... can you help me?

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Kuba Kucharski
>
> My point here was about the general web2py population rather than your
> "thing".  No offense intended, but you have a special case.  web2py handles
> web-services but that is not it's primary function.

yes, true, I was just explaining my httperf thinking


>I think Massimo wishes
> to primarily direct web2py toward the traditional "browsers requesting web
> content over persistent connections" situation.  (Massimo, as always, I'm
> open to correction.)

I think so too.
On the other hand "@services" are very very powerfull tool in web2py
and are as much important as classic web-services

-- 
Kuba

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Thadeus Burgess
There is a conspiracy that the google bot reduces the page ranking if
it uses a table layout instead of css layout.

I don't believe it though, since why would google NOT index something?

The limitations of tables mean you can't reorganize your content, that
is the beauty of css, you can take the same html file, plug different
css into it and have a completely different site, only because the css
file changes.

http://www.csszengarden.com/ (on the right side is links to apply
different css layouts to the same html page)

Its really not hard, and the box model is not that bad, its just
confusing and most don't know how to use it properly.

http://www.stubbornella.org/content/2009/02/12/css-doesn%E2%80%99t-suck-you%E2%80%99re-just-doing-it-wrong/

Here are perfect examples of the box model working correctly.

http://matthewjamestaylor.com/blog/perfect-3-column.htm
http://www.alistapart.com/articles/holygrail

-Thadeus





On Fri, Mar 19, 2010 at 10:33 AM, Jonathan Lundell  wrote:
> syncrasies of CSS; I do that, pretty much. My complaint is that its box model 
> from the beginning was unsuited to what designers normally do, and the result 
> is the proliferation of CSS frameworks that exist mainly to work around its 
> limitations.
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Timothy Farrell



In my own test, the difference (on Windows) between 1 and 10 yields a ~2.5x 
increase in requests per second.  I don't have a readily accessible Linux right 
now.  Kuba, please run these>numbers again with --num-calls=10.
 

my reality is a lot of concurrent connections with only one call.
I did num-calls=1 on purpose. I needed this test because of a "thing"
I am building and this thing MUST work like this.

Although I will try num-calls10 as soon as I have access to my testing
environment again
   
Perhaps it's important to state the context for which our benchmarks are 
conducted.




In the bigger picture, there are some other matters to consider:
- Who will likely run web2py with the build-in webserver?  New users testing
things out or devs running relatively small jobs.
 

This might not be true. My "thing" is not for users surfing through
some web application..downloading.. having sessions.., it is about
some voice over ip servers talking to my servers via xml-rpc. So, I
may need embedded server(like rocket or cherrypy) in production
because it could simplify cluster environment
   
My point here was about the general web2py population rather than your 
"thing".  No offense intended, but you have a special case.  web2py 
handles web-services but that is not it's primary function.  I think 
Massimo wishes to primarily direct web2py toward the traditional 
"browsers requesting web content over persistent connections" 
situation.  (Massimo, as always, I'm open to correction.)



thank you for your time, Tim, Rocket code looks really impressive
   


I built Rocket because I saw some deficiencies in Cherrypy.  I'm not 
expecting that web2py and Rocket will have totally compatible goals, but 
I do think that there is enough overlap for the projects to benefit from 
each other.  Beyond that, Rocket is young and there are plenty of 
optimization and tuning options yet to be explored.



-tim

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Jonathan Lundell
On Mar 19, 2010, at 7:27 AM, Thadeus Burgess wrote:

> CSS does not suck, your just doing it wrong!
> 
> Massimo, I have done this layout that you want many many times in css,
> without a framework, ez-css makes this even easier.

The author of ez-css is refreshingly candid, at least by implication, about the 
suckiness of CSS for layout. One reason all his layouts work as well as they do 
is that all the columns have the same background (white in his examples). 
You'll notice if you look at the actual dimensions of his divs on the actual 
pages on the site that the column divs are not in fact the same height; you 
just don't see it because they're the same color background.

It may be that one's best course is to design around the limitations and 
idiosyncrasies of CSS; I do that, pretty much. My complaint is that its box 
model from the beginning was unsuited to what designers normally do, and the 
result is the proliferation of CSS frameworks that exist mainly to work around 
its limitations.

I *ought* to be able to say: put a full-width header and footer on the page. 
Give me n columns in any reasonable combination of widths that I care to 
specify, and make them all the size of the tallest, with single-pixel borders 
all around. And I ought to be able to say it simply. But I can't. 

I *can* say that trivially with a table. Tables have their own limitations, and 
CSS corrects some of them. But it seems to me that CSS shouldn't have made the 
layouts we can get trivially with tables difficult or impossible with CSS.


> 
> And the way you describe it, ez-css does exactly what you want? Look
> at their layout 2. So the blue number 1 (1 comes first physically in
> the html) must have a size declared (your menu, 200px). The number 2
> (content) comes second, and flows the full width of the container
> object.
> 
> To take a quote from their site that is easy to miss. """The numbers
> in the modules and layouts above show the source order (the HTML
> flow). Blue numbers correspond to columns for which a width needs to
> be set (which are all columns in a module but the last one in the
> flow)."""
> 
> -Thadeus
> 
> 
> 
> 
> 
> On Fri, Mar 19, 2010 at 3:05 AM, Abd Shomad  wrote:
>> Dear Massimo,
>> 
>> This is my first post to web2py :)
>> 
>> I proposed to have a look at Fluid 960 Grid System [1] example.
>> 
>> [1] http://www.designinfluences.com/fluid960gs/
>> 
>> What you want to accomplish is (almost) doable, except for the "static" part.
>> If you resize the browser, the static area (left section menu) will
>> not "fluid" nicely like the other area. If we can forget about
>> "static" area, and just let Fluid 960 Grid System do the magic, we can
>> resize the browser and yet still have a proportional display for each
>> area.  Please try using the above link and resize your browser, you
>> will see that the [Section Menu] will fluid nicely alongside the
>> other.
>> 
>> As a web framework, web2py developer will deals with lots of form
>> elements, and I think that Fluid 960 Grid System [1] will be a good
>> alternative to beautify web2py layout, because it contains almost all
>> form elements in a very nice design.
>> From the basic tutorial [2], I believe everybody here can master the
>> grid system in no more than 5 minutes :)
>> 
>> [2] http://divitodesign.com/css/960-css-framework-learn-basics/
>> 
>> Using Fluid 960 Grid System, what you want to do can be accomplished
>> like below:
>> 
>> 
>>
>>  web2py brand, 16 grids = 16 * 60 px
>>  
>>  
>>Left Menu, 4 grids = 4 * 60 px
>>  
>>  
>>Column 1, 6 grids = 6 * 60 px
>>  
>>  
>>Column 2, 6 grids = 6 * 60 px
>>  
>>  
>>  web2py footer, 16 grids = 16 * 60 px
>>  
>>
>> 
>> 
>> Please check.
>> 
>> Side note:
>> Some interesting statistic about "css framework" on delicious:
>> -
>> No. Title Bookmark Count
>> -
>>  1. 960 Grid System: 17,962
>>  2. Blueprint CSS Framework: 8,690
>>  3. Yahoo! UI Library: Grids CSS: 4,651
>>  4. Fluid 960 Grid System: 3,219 <-- based on 960 Grid System (1)
>>  4. BlutTrip: 1,394
>>  5. oocss: 1,265
>>  6. the-golden-grid: 1,259
>>  7. SenCSs: 604
>>  8. ez-css: 445
>> 
>> 
>> 
>> 
>> Abd Shomad
>> 
>> 2010/3/19 mdipierro :
>>> I played with ez-css (which I like) but yet it reminded why I used
>>> tables. Here is my problem and I am sure it is just me being dumb. Say
>>> I want a header, a footer and two columns in between. I want the left
>>> column of fixed with (a menu, 200px) and a right column to foll the
>>> rest of the space (content). Because of the way it works (and most of
>>> these frameworks work the same way), the columns float to right
>>> therefore I must specifycontent before the menu. Hence I cannot find a
>>> way to make the menu fixed width and the co

Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Kuba Kucharski
On Fri, Mar 19, 2010 at 2:48 PM, mdipierro  wrote:
> Can you also do me a favor? Can you benchmark sneaky.py (in web2py/
> gluon/)? In my tests it was faster than cherryby and I thought rocket
> was an improvement over it.

ok, as soon as I get back to my testing environment again

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Kuba Kucharski
>Just looking over the httperf command, Kuba used --num-calls=1  This would not 
>be an accurate real-world test because it creates a new connection for every 
>request whereas most >browsers span requests over only a few connections.  
>Nicholas Piel's test used --num-calls=10 for testing HTTP/1.1 servers.

>In my own test, the difference (on Windows) between 1 and 10 yields a ~2.5x 
>increase in requests per second.  I don't have a readily accessible Linux 
>right now.  Kuba, please run these >numbers again with --num-calls=10.

my reality is a lot of concurrent connections with only one call.
I did num-calls=1 on purpose. I needed this test because of a "thing"
I am building and this thing MUST work like this.

Although I will try num-calls10 as soon as I have access to my testing
environment again


> I'd be curious which version Nicholas Piel tested.  I just fixed a
> performance issue yesterday for linux.  If he tested prior to that version
> (1.0.2) then yes, it would appear much slower.

he used 1.0.1 - I am almost sure because  comments about Rocket came
on his blog entry earlier than yesterday and he was writing about
doing rocket benchmarks in past tense so my conclusion/feeling is that
he tested the version with a bug.

> Some other things to consider:
> - Kuba, how many processor cores are on your test machine?  Having more
> processes than processors will hurt Rocket more than Cherrypy.

of course 4 processor cores. I tried 8 processes over 4 processor
cores and indeed there is no gain

> - It seems that you are testing this against web2py (notice how all the
> responses are 3xx), perhaps you should just test the servers themselves for
> now.  If that's not the case, may we see the invocation code?

yes.
although I am testing both with web2py, and same application for both.
It is fair. I'm not comparing my benchmarks with those from Nicholas.
My "thing" will run web2py so this is what interests me.

> In the bigger picture, there are some other matters to consider:
> - Who will likely run web2py with the build-in webserver?  New users testing
> things out or devs running relatively small jobs.

This might not be true. My "thing" is not for users surfing through
some web application..downloading.. having sessions.., it is about
some voice over ip servers talking to my servers via xml-rpc. So, I
may need embedded server(like rocket or cherrypy) in production
because it could simplify cluster environment


thank you for your time, Tim, Rocket code looks really impressive

-- 
Kuba

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Layout Plugin

2010-03-19 Thread Matthew McNaughton
Greetings team,
I recently tried to use the layout plugin, but my experience has been
less than stellar. After installing the plug in, and choosing a design
to use, I get a web2py site with only text and no color.

While I would love to get the layout plugin to work, any design would be
good at this point in time. I have tried clicking "Return to default" in
the plug in, uninstalling the plug-in, overwriting the base.css etc with
one from a default web2py also with no success.

I also watching massimo's video on Vimeo but I haven't had much luck.
Any help would be appreciated. Thank you all.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: routes.py not working

2010-03-19 Thread Francisco Costa
Thank you mr.feeze and Vasile for your help

I wasn't.. :/

Now it works perfectly!


On Mar 19, 12:32 pm, Vasile Ermicioi  wrote:
> yes, to apply changes in routes you need to restart web server

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Does the pdf manual differ from the online official web2py book a lot?

2010-03-19 Thread Thadeus Burgess
Speaking of this. Massimo can we get a "latest update" feed for the
online book, to make it easier to keep track of new things?

-Thadeus





On Fri, Mar 19, 2010 at 9:44 AM, Thadeus Burgess  wrote:
> New web2py features added to the online book, so you will miss certain
> things, since the PDF book is about a year old now, whereas the online
> book is being added to and expanded.
>
> -Thadeus
>
>
>
>
>
> On Fri, Mar 19, 2010 at 8:12 AM, mdipierro  wrote:
>> One month ago they were identical but the online one is a wiki so some
>> users have improved it, but no major differences yet.
>>
>> On Mar 19, 3:37 am, zkingw  wrote:
>>> Hi, all:
>>>
>>> I came across web2py earlier this week, and I fall into love with it
>>> right away, and decided to learn it as my very first python web
>>> framework.
>>>
>>> I got the pdf version of the manual in hand, already finished the
>>> first two chapters, and move into the Core part, have to say that's
>>> one of the best tutorial. My question is that does the pdf manual
>>> differ from the online official book a lot? And what's the difference
>>> between those two versions exactly? I want to stay with the pdf manual
>>> as I can read it using my ebook reader which is really nice, but I
>>> dont want missing the important stuff because the version difference.
>>>
>>> thanks for your kindly advices.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Does the pdf manual differ from the online official web2py book a lot?

2010-03-19 Thread Thadeus Burgess
New web2py features added to the online book, so you will miss certain
things, since the PDF book is about a year old now, whereas the online
book is being added to and expanded.

-Thadeus





On Fri, Mar 19, 2010 at 8:12 AM, mdipierro  wrote:
> One month ago they were identical but the online one is a wiki so some
> users have improved it, but no major differences yet.
>
> On Mar 19, 3:37 am, zkingw  wrote:
>> Hi, all:
>>
>> I came across web2py earlier this week, and I fall into love with it
>> right away, and decided to learn it as my very first python web
>> framework.
>>
>> I got the pdf version of the manual in hand, already finished the
>> first two chapters, and move into the Core part, have to say that's
>> one of the best tutorial. My question is that does the pdf manual
>> differ from the online official book a lot? And what's the difference
>> between those two versions exactly? I want to stay with the pdf manual
>> as I can read it using my ebook reader which is really nice, but I
>> dont want missing the important stuff because the version difference.
>>
>> thanks for your kindly advices.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Timothy Farrell

On 3/19/2010 9:27 AM, Thadeus Burgess wrote:

CSS does not suck, your just doing it wrong!
   

Isn't that supposed to be "Javascript"?

CSS has never sucked, only IE's broken support for it.  =)

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Thadeus Burgess
By the way, it is advantageous to SEO purposes to always have your
HTML content physically in the order of relevance (meaning content
before sidebar, site name before content, etc...).

So having to define your content before the sidebar is a good thing!
Regardless if its rendered location is different.

-Thadeus





On Fri, Mar 19, 2010 at 9:27 AM, Thadeus Burgess  wrote:
> CSS does not suck, your just doing it wrong!
>
> Massimo, I have done this layout that you want many many times in css,
> without a framework, ez-css makes this even easier.
>
> And the way you describe it, ez-css does exactly what you want? Look
> at their layout 2. So the blue number 1 (1 comes first physically in
> the html) must have a size declared (your menu, 200px). The number 2
> (content) comes second, and flows the full width of the container
> object.
>
> To take a quote from their site that is easy to miss. """The numbers
> in the modules and layouts above show the source order (the HTML
> flow). Blue numbers correspond to columns for which a width needs to
> be set (which are all columns in a module but the last one in the
> flow)."""
>
> -Thadeus
>
>
>
>
>
> On Fri, Mar 19, 2010 at 3:05 AM, Abd Shomad  wrote:
>> Dear Massimo,
>>
>> This is my first post to web2py :)
>>
>> I proposed to have a look at Fluid 960 Grid System [1] example.
>>
>> [1] http://www.designinfluences.com/fluid960gs/
>>
>> What you want to accomplish is (almost) doable, except for the "static" part.
>> If you resize the browser, the static area (left section menu) will
>> not "fluid" nicely like the other area. If we can forget about
>> "static" area, and just let Fluid 960 Grid System do the magic, we can
>> resize the browser and yet still have a proportional display for each
>> area.  Please try using the above link and resize your browser, you
>> will see that the [Section Menu] will fluid nicely alongside the
>> other.
>>
>> As a web framework, web2py developer will deals with lots of form
>> elements, and I think that Fluid 960 Grid System [1] will be a good
>> alternative to beautify web2py layout, because it contains almost all
>> form elements in a very nice design.
>> From the basic tutorial [2], I believe everybody here can master the
>> grid system in no more than 5 minutes :)
>>
>> [2] http://divitodesign.com/css/960-css-framework-learn-basics/
>>
>> Using Fluid 960 Grid System, what you want to do can be accomplished
>> like below:
>>
>> 
>>    
>>      web2py brand, 16 grids = 16 * 60 px
>>      
>>      
>>        Left Menu, 4 grids = 4 * 60 px
>>      
>>      
>>        Column 1, 6 grids = 6 * 60 px
>>      
>>      
>>        Column 2, 6 grids = 6 * 60 px
>>      
>>      
>>      web2py footer, 16 grids = 16 * 60 px
>>      
>>    
>> 
>>
>> Please check.
>>
>> Side note:
>> Some interesting statistic about "css framework" on delicious:
>> -
>> No. Title                                 Bookmark Count
>> -
>>  1. 960 Grid System: 17,962
>>  2. Blueprint CSS Framework: 8,690
>>  3. Yahoo! UI Library: Grids CSS: 4,651
>>  4. Fluid 960 Grid System: 3,219 <-- based on 960 Grid System (1)
>>  4. BlutTrip: 1,394
>>  5. oocss: 1,265
>>  6. the-golden-grid: 1,259
>>  7. SenCSs: 604
>>  8. ez-css: 445
>>
>>
>>
>>
>> Abd Shomad
>>
>> 2010/3/19 mdipierro :
>>> I played with ez-css (which I like) but yet it reminded why I used
>>> tables. Here is my problem and I am sure it is just me being dumb. Say
>>> I want a header, a footer and two columns in between. I want the left
>>> column of fixed with (a menu, 200px) and a right column to foll the
>>> rest of the space (content). Because of the way it works (and most of
>>> these frameworks work the same way), the columns float to right
>>> therefore I must specifycontent before the menu. Hence I cannot find a
>>> way to make the menu fixed width and the content fill the rest of the
>>> space without messing up the alignment of the boxes. Can you do it?
>>>
>>> Massimo
>>>
>>> On Mar 18, 11:46 pm, Yarko Tymciurak 
>>> wrote:
 On Mar 18, 10:31 pm, mdipierro  wrote:

 > The problem I see is that it is too simple.
 > sizeXofY does not seem to guarantee that all columns have the same
 > lenght (ez-css does it).
 > I like to have the menu column fixed width and the main column elastic
 > and it does not do that (not sure if ez-css does).

 I have installed ez-css to try out / play with...  it does do fixed
 width + variable width columns:

 In multiple ways, actually (depending on how you nest it);   
 seehttp://www.ez-css.org/layouts

 See module 2A, 2B, layout 2, layout 3, etc

 Each of these use "ez-50", a 50% width element, or "ez-33", a 33%
 width element.

 ez-css encourages you to create your own width element if the pre-
 defined ones don't "do it" for you - so, crea

Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Timothy Farrell
Just looking over the httperf command, Kuba used --num-calls=1  This 
would not be an accurate real-world test because it creates a new 
connection for every request whereas most browsers span requests over 
only a few connections.  Nicholas Piel's test used --num-calls=10 for 
testing HTTP/1.1 servers.


In my own test, the difference (on Windows) between 1 and 10 yields a 
~2.5x increase in requests per second.  I don't have a readily 
accessible Linux right now.  Kuba, please run these numbers again with 
--num-calls=10.


-tim

On 3/19/2010 8:49 AM, Timothy Farrell wrote:
This is a different test than the one I presented.  The test I 
presented was run on Windows with one instance and tested with 
ApacheBench.  I've looked at httperf a little and it seems to be a 
more realistic test than ApacheBench.


Due to the nature of how Rocket handles listening sockets, it is a 
little slower at accepting connections compared to Cherrypy.  Nicholas 
Piel's test handles 10 requests per connection whereas Apachebench 
would handle 1000.  So there will be a difference by virtue of the 
difference in fresh connections.  This could explain why Rocket is 
slower with 4 instances, but that being the case it should also be 
slower with one instance (even though they hit some arbitrary external 
wall) which is inconclusive at this point.


I'd be curious which version Nicholas Piel tested.  I just fixed a 
performance issue yesterday for linux.  If he tested prior to that 
version (1.0.2) then yes, it would appear much slower.


Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?

Note that my tests were run on Windows.  I'm not sure what Cherrypy's 
bottleneck on Windows is, but Rocket is not subject to it on that 
platform.  Also, Rocket uses less memory (by almost 2MB) than Cherrypy 
on Windows 7.  I haven't looked at memory usage in Linux but due to 
Rocket's less-custom code-base we should see a similarly smaller 
memory usage amount.


In the 4-instance test, this is not a use-case I'd considered yet.  As 
previously mentioned, Rocket is slower at accepting connections.  If 
pound was closing the connection (HTTP 1.0 behavior and some HTTP 1.1 
proxies) after every request, this could explain why Rocket comes up 
slower.


Some other things to consider:
- Kuba, how many processor cores are on your test machine?  Having 
more processes than processors will hurt Rocket more than Cherrypy.
- It seems that you are testing this against web2py (notice how all 
the responses are 3xx), perhaps you should just test the servers 
themselves for now.  If that's not the case, may we see the invocation 
code?


In the bigger picture, there are some other matters to consider:
- Who will likely run web2py with the build-in webserver?  New users 
testing things out or devs running relatively small jobs.
- What platforms will those run on?  Windows in the former.  The 
latter is anyone's guess.  (Let's not start a rabbit-trail about which 
operating system is better, just consider which one most students run.)


So here are some things to consider in this situation:
- Rocket measures (not horribly) slower than Cherrypy on Linux with 4 
instances running.  How common of a situation is this?
- Rocket is not affected by a major concurrency issue with 
single-instance Cherrypy on Windows.


I think going forward we should figure out which one is truly faster 
as a single-instance on Linux.  I wouldn't be surprised if Rocket is 
slightly slower than Cherrypy but it should not be vastly slower.  The 
goal of Rocket was not to be faster than Cherrypy but to be more 
concurrent.  So far that's true for Windows and inconclusive on 
Linux.  I don't have access to a Mac, but I would be surprised if Macs 
performed differently than Linux.


Anyone know how to identify that wall that both servers are hitting on 
Linux?


-tim

On 3/19/2010 5:36 AM, Kuba Kucharski wrote:

Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?

1. Tim?
2. I have a lot of free memory while testing


I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piël
http://nichol.as/benchmark-of-python-web-servers

In short he says:


make sure you do not use ab

yes, in my tests I use httperf


make sure you are running from other machine with limits also tweaked

this is done like that by me


use recompiled httperf

done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."







--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-19 Thread Thadeus Burgess
CSS does not suck, your just doing it wrong!

Massimo, I have done this layout that you want many many times in css,
without a framework, ez-css makes this even easier.

And the way you describe it, ez-css does exactly what you want? Look
at their layout 2. So the blue number 1 (1 comes first physically in
the html) must have a size declared (your menu, 200px). The number 2
(content) comes second, and flows the full width of the container
object.

To take a quote from their site that is easy to miss. """The numbers
in the modules and layouts above show the source order (the HTML
flow). Blue numbers correspond to columns for which a width needs to
be set (which are all columns in a module but the last one in the
flow)."""

-Thadeus





On Fri, Mar 19, 2010 at 3:05 AM, Abd Shomad  wrote:
> Dear Massimo,
>
> This is my first post to web2py :)
>
> I proposed to have a look at Fluid 960 Grid System [1] example.
>
> [1] http://www.designinfluences.com/fluid960gs/
>
> What you want to accomplish is (almost) doable, except for the "static" part.
> If you resize the browser, the static area (left section menu) will
> not "fluid" nicely like the other area. If we can forget about
> "static" area, and just let Fluid 960 Grid System do the magic, we can
> resize the browser and yet still have a proportional display for each
> area.  Please try using the above link and resize your browser, you
> will see that the [Section Menu] will fluid nicely alongside the
> other.
>
> As a web framework, web2py developer will deals with lots of form
> elements, and I think that Fluid 960 Grid System [1] will be a good
> alternative to beautify web2py layout, because it contains almost all
> form elements in a very nice design.
> From the basic tutorial [2], I believe everybody here can master the
> grid system in no more than 5 minutes :)
>
> [2] http://divitodesign.com/css/960-css-framework-learn-basics/
>
> Using Fluid 960 Grid System, what you want to do can be accomplished
> like below:
>
> 
>    
>      web2py brand, 16 grids = 16 * 60 px
>      
>      
>        Left Menu, 4 grids = 4 * 60 px
>      
>      
>        Column 1, 6 grids = 6 * 60 px
>      
>      
>        Column 2, 6 grids = 6 * 60 px
>      
>      
>      web2py footer, 16 grids = 16 * 60 px
>      
>    
> 
>
> Please check.
>
> Side note:
> Some interesting statistic about "css framework" on delicious:
> -
> No. Title                                 Bookmark Count
> -
>  1. 960 Grid System: 17,962
>  2. Blueprint CSS Framework: 8,690
>  3. Yahoo! UI Library: Grids CSS: 4,651
>  4. Fluid 960 Grid System: 3,219 <-- based on 960 Grid System (1)
>  4. BlutTrip: 1,394
>  5. oocss: 1,265
>  6. the-golden-grid: 1,259
>  7. SenCSs: 604
>  8. ez-css: 445
>
>
>
>
> Abd Shomad
>
> 2010/3/19 mdipierro :
>> I played with ez-css (which I like) but yet it reminded why I used
>> tables. Here is my problem and I am sure it is just me being dumb. Say
>> I want a header, a footer and two columns in between. I want the left
>> column of fixed with (a menu, 200px) and a right column to foll the
>> rest of the space (content). Because of the way it works (and most of
>> these frameworks work the same way), the columns float to right
>> therefore I must specifycontent before the menu. Hence I cannot find a
>> way to make the menu fixed width and the content fill the rest of the
>> space without messing up the alignment of the boxes. Can you do it?
>>
>> Massimo
>>
>> On Mar 18, 11:46 pm, Yarko Tymciurak 
>> wrote:
>>> On Mar 18, 10:31 pm, mdipierro  wrote:
>>>
>>> > The problem I see is that it is too simple.
>>> > sizeXofY does not seem to guarantee that all columns have the same
>>> > lenght (ez-css does it).
>>> > I like to have the menu column fixed width and the main column elastic
>>> > and it does not do that (not sure if ez-css does).
>>>
>>> I have installed ez-css to try out / play with...  it does do fixed
>>> width + variable width columns:
>>>
>>> In multiple ways, actually (depending on how you nest it);   
>>> seehttp://www.ez-css.org/layouts
>>>
>>> See module 2A, 2B, layout 2, layout 3, etc
>>>
>>> Each of these use "ez-50", a 50% width element, or "ez-33", a 33%
>>> width element.
>>>
>>> ez-css encourages you to create your own width element if the pre-
>>> defined ones don't "do it" for you - so, create a
>>> ez-500px, and you'd have what you want.
>>>
>>> This seems like a really clean, easily modifiable and "combinable"
>>> package...  I'm going to play with it in the next few days to see how
>>> my opinion holds up in use.
>>>
>>> - Yarko
>>>
>>>
>>>
>>> > On Mar 18, 8:59 pm, villas  wrote:
>>>
>>> > > Ez-css seems like a good enough option,  but before making your mind
>>> > > up, have a look at the simplicity of oocss.org/grids_docs.html (with
>>> > > Firebug).  Oocss might give more possibilities,  but admi

[web2py] Re: about syntax in web2py

2010-03-19 Thread DenesL
OK, but I believe you have another problem, in the statement

db[table].insert(field=sh.cell_value(row,col))

field here is evaluated as 'field' not as the content of the field
variable
so you are setting a field named 'field' to the content of the cell,
you would have to do:

db[table].insert(** { field:sh.cell_value(row,col) } )

and similarly on the other insert.


On Mar 19, 10:13 am, tandnk50  wrote:
> ok, I solved my problem :) , I missed a )
> thank you
>
> On 19 Tháng Ba, 20:51, tandnk50  wrote:
>
> > ok, this is my action code. I want import data
>
> > def read_xls():
> >     exec('import applications.%s.modules.xlrd as xlrd' %
> > request.application)
> >     import os
> >     path=os.path.join
> > (request.folder,'private','a_dummy_file_name.xls')
> >     book = xlrd.open_workbook(path)
> >     sh = book.sheet_by_index(0)
> >     table=request.vars['select']
> >     students={}
> >     field=len(db[table].fields)-1
> >     if (sh.ncols <> field):
> >        response.flash='select table again'
> >        redirect(URL(r=request,f='view_xls'))
>
> >     for col,field in enumerate(db[table].fields):
> >         for row in range(sh.nrows):
> >           if (row==0):
> >                 db[table].insert(field=sh.cell_value(row,col))
> >                 table_id[str(col)]=db[table].id
> >                 continue
> >           db(db[table].id==table_id[str(col)]
> > [table].insert(field=sh.cell_value(row,col))
> >     students=db().select(db[table].ALL)
>
> >     return dict(students=studens)
>
> > On 19 Tháng Ba, 20:47, DenesL  wrote:
>
> > > Can you show the action's whole source?.
>
> > > On Mar 19, 9:38 am, tandnk50  wrote:
>
> > > > I'm sorry .
> > > > But my above code writeen in a action, the 'return dict()' is for the
> > > > action
>
> > > > On 19 Tháng Ba, 20:34, DenesL  wrote:
>
> > > > > return may only occur syntactically nested in a function definition,
> > > > > you don't have one.
>
> > > > > On Mar 19, 9:06 am, tandnk50  wrote:> I wrote 
> > > > > statements but invalid syntax and i don't know the problem,
> > > > > > for example  :
>
> > > > > def func():
> > > > >     for i in range(3):
>
> > > > > >      for j in range(2):
> > > > > >          if i>1 :
> > > > > >             print i
> > > > > >          else:
> > > > > >             print j
> > > > > > return dict() (or any statement ( eg, print 'hello')..)
>
> > > > > > but invaliad syntax at return ...
> > > > > > ??
> > > > > > how do i fix ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: about syntax in web2py

2010-03-19 Thread tandnk50
ok, I solved my problem :) , I missed a )
thank you

On 19 Tháng Ba, 20:51, tandnk50  wrote:
> ok, this is my action code. I want import data
>
> def read_xls():
>     exec('import applications.%s.modules.xlrd as xlrd' %
> request.application)
>     import os
>     path=os.path.join
> (request.folder,'private','a_dummy_file_name.xls')
>     book = xlrd.open_workbook(path)
>     sh = book.sheet_by_index(0)
>     table=request.vars['select']
>     students={}
>     field=len(db[table].fields)-1
>     if (sh.ncols <> field):
>        response.flash='select table again'
>        redirect(URL(r=request,f='view_xls'))
>
>     for col,field in enumerate(db[table].fields):
>         for row in range(sh.nrows):
>           if (row==0):
>                 db[table].insert(field=sh.cell_value(row,col))
>                 table_id[str(col)]=db[table].id
>                 continue
>           db(db[table].id==table_id[str(col)]
> [table].insert(field=sh.cell_value(row,col))
>     students=db().select(db[table].ALL)
>
>     return dict(students=studens)
>
> On 19 Tháng Ba, 20:47, DenesL  wrote:
>
>
>
> > Can you show the action's whole source?.
>
> > On Mar 19, 9:38 am, tandnk50  wrote:
>
> > > I'm sorry .
> > > But my above code writeen in a action, the 'return dict()' is for the
> > > action
>
> > > On 19 Tháng Ba, 20:34, DenesL  wrote:
>
> > > > return may only occur syntactically nested in a function definition,
> > > > you don't have one.
>
> > > > On Mar 19, 9:06 am, tandnk50  wrote:> I wrote 
> > > > statements but invalid syntax and i don't know the problem,
> > > > > for example  :
>
> > > > def func():
> > > >     for i in range(3):
>
> > > > >      for j in range(2):
> > > > >          if i>1 :
> > > > >             print i
> > > > >          else:
> > > > >             print j
> > > > > return dict() (or any statement ( eg, print 'hello')..)
>
> > > > > but invaliad syntax at return ...
> > > > > ??
> > > > > how do i fix ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: about syntax in web2py

2010-03-19 Thread Wes James
On Fri, Mar 19, 2010 at 7:51 AM, tandnk50  wrote:
> ok, this is my action code. I want import data
>


>
>    return dict(students=studens)
>


you have dict(students=studens) - mispelled second students.???

-wes

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Alex Fanjul
Massimo, there is no possibility to keep both of two and select one? 
anyway it's only a file isn't it?

Or maybe keep it as plugins to download?
alex

El 19/03/2010 14:24, mdipierro escribió:

Clearly we have conflicting benchmarks. I like Rocket because it is
cleaner but we need to go with the fastest. Let's wait for Tim
response and we there is a disagreement I propose that a few more
people try reproduce the benchmarks (to make sure there is not
something weird in the setup) and then we decide what to do.

Massimo

On Mar 19, 5:36 am, Kuba Kucharski  wrote:
   

Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?
   

1. Tim?
2. I have a lot of free memory while testing

I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piëlhttp://nichol.as/benchmark-of-python-web-servers

In short he says:

 

make sure you do not use ab
   

yes, in my tests I use httperf

 

make sure you are running from other machine with limits also tweaked
   

this is done like that by me

 

use recompiled httperf
   

done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."

--
Kuba
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: about syntax in web2py

2010-03-19 Thread tandnk50
ok, this is my action code. I want import data

def read_xls():
exec('import applications.%s.modules.xlrd as xlrd' %
request.application)
import os
path=os.path.join
(request.folder,'private','a_dummy_file_name.xls')
book = xlrd.open_workbook(path)
sh = book.sheet_by_index(0)
table=request.vars['select']
students={}
field=len(db[table].fields)-1
if (sh.ncols <> field):
   response.flash='select table again'
   redirect(URL(r=request,f='view_xls'))


for col,field in enumerate(db[table].fields):
for row in range(sh.nrows):
  if (row==0):
db[table].insert(field=sh.cell_value(row,col))
table_id[str(col)]=db[table].id
continue
  db(db[table].id==table_id[str(col)]
[table].insert(field=sh.cell_value(row,col))
students=db().select(db[table].ALL)

return dict(students=studens)

On 19 Tháng Ba, 20:47, DenesL  wrote:
> Can you show the action's whole source?.
>
> On Mar 19, 9:38 am, tandnk50  wrote:
>
>
>
> > I'm sorry .
> > But my above code writeen in a action, the 'return dict()' is for the
> > action
>
> > On 19 Tháng Ba, 20:34, DenesL  wrote:
>
> > > return may only occur syntactically nested in a function definition,
> > > you don't have one.
>
> > > On Mar 19, 9:06 am, tandnk50  wrote:> I wrote 
> > > statements but invalid syntax and i don't know the problem,
> > > > for example  :
>
> > > def func():
> > >     for i in range(3):
>
> > > >      for j in range(2):
> > > >          if i>1 :
> > > >             print i
> > > >          else:
> > > >             print j
> > > > return dict() (or any statement ( eg, print 'hello')..)
>
> > > > but invaliad syntax at return ...
> > > > ??
> > > > how do i fix ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Timothy Farrell
This is a different test than the one I presented.  The test I presented 
was run on Windows with one instance and tested with ApacheBench.  I've 
looked at httperf a little and it seems to be a more realistic test than 
ApacheBench.


Due to the nature of how Rocket handles listening sockets, it is a 
little slower at accepting connections compared to Cherrypy.  Nicholas 
Piel's test handles 10 requests per connection whereas Apachebench would 
handle 1000.  So there will be a difference by virtue of the difference 
in fresh connections.  This could explain why Rocket is slower with 4 
instances, but that being the case it should also be slower with one 
instance (even though they hit some arbitrary external wall) which is 
inconclusive at this point.


I'd be curious which version Nicholas Piel tested.  I just fixed a 
performance issue yesterday for linux.  If he tested prior to that 
version (1.0.2) then yes, it would appear much slower.


Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?

Note that my tests were run on Windows.  I'm not sure what Cherrypy's 
bottleneck on Windows is, but Rocket is not subject to it on that 
platform.  Also, Rocket uses less memory (by almost 2MB) than Cherrypy 
on Windows 7.  I haven't looked at memory usage in Linux but due to 
Rocket's less-custom code-base we should see a similarly smaller memory 
usage amount.


In the 4-instance test, this is not a use-case I'd considered yet.  As 
previously mentioned, Rocket is slower at accepting connections.  If 
pound was closing the connection (HTTP 1.0 behavior and some HTTP 1.1 
proxies) after every request, this could explain why Rocket comes up slower.


Some other things to consider:
- Kuba, how many processor cores are on your test machine?  Having more 
processes than processors will hurt Rocket more than Cherrypy.
- It seems that you are testing this against web2py (notice how all the 
responses are 3xx), perhaps you should just test the servers themselves 
for now.  If that's not the case, may we see the invocation code?


In the bigger picture, there are some other matters to consider:
- Who will likely run web2py with the build-in webserver?  New users 
testing things out or devs running relatively small jobs.
- What platforms will those run on?  Windows in the former.  The latter 
is anyone's guess.  (Let's not start a rabbit-trail about which 
operating system is better, just consider which one most students run.)


So here are some things to consider in this situation:
- Rocket measures (not horribly) slower than Cherrypy on Linux with 4 
instances running.  How common of a situation is this?
- Rocket is not affected by a major concurrency issue with 
single-instance Cherrypy on Windows.


I think going forward we should figure out which one is truly faster as 
a single-instance on Linux.  I wouldn't be surprised if Rocket is 
slightly slower than Cherrypy but it should not be vastly slower.  The 
goal of Rocket was not to be faster than Cherrypy but to be more 
concurrent.  So far that's true for Windows and inconclusive on Linux.  
I don't have access to a Mac, but I would be surprised if Macs performed 
differently than Linux.


Anyone know how to identify that wall that both servers are hitting on 
Linux?


-tim

On 3/19/2010 5:36 AM, Kuba Kucharski wrote:

Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?
 

1. Tim?
2. I have a lot of free memory while testing


I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piël
http://nichol.as/benchmark-of-python-web-servers

In short he says:

   

make sure you do not use ab
 

yes, in my tests I use httperf

   

make sure you are running from other machine with limits also tweaked
 

this is done like that by me

   

use recompiled httperf
 

done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."



   


--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread mdipierro
Can you also do me a favor? Can you benchmark sneaky.py (in web2py/
gluon/)? In my tests it was faster than cherryby and I thought rocket
was an improvement over it.

On Mar 19, 8:43 am, Kuba Kucharski  wrote:
> I like Rocket too. I would like it to be better than Cherrypy
>
> --
> Kuba

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] About backward compatibility

2010-03-19 Thread Alex Fanjul
I've just got to read that the yii framework folks share the same 
oppinion as me about backward compatibility and the payoff to mantain it 
for ever.


Reading this article 
 
you can read that they have realased a big mayor version of the 
framework, now you have to choose what to do with your work:
-you can choose to manually upgrade your work using the official guide 


-or you can choose to stay at 1.0.x version

They also give you some tips:

-
SHOULD I USE YII 1.1?
If you are already using Yii 1.0 to develop your project which is about 
half-way done, we suggest you do not upgrade to 1.1 because there are 
quite some changes that break backward compatibility.
You just started a new project, we recommend you upgrade to 1.1 because 
it will receive most of our maintenance effort from now on. While we 
will continue to maintain 1.0, we expect it will only receive bug fixes 
in future.


If you are new to Yii, you should start with 1.1.
--

Of course it's a personal opinion,
alex

--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: about syntax in web2py

2010-03-19 Thread DenesL
Can you show the action's whole source?.

On Mar 19, 9:38 am, tandnk50  wrote:
> I'm sorry .
> But my above code writeen in a action, the 'return dict()' is for the
> action
>
> On 19 Tháng Ba, 20:34, DenesL  wrote:
>
> > return may only occur syntactically nested in a function definition,
> > you don't have one.
>
> > On Mar 19, 9:06 am, tandnk50  wrote:> I wrote 
> > statements but invalid syntax and i don't know the problem,
> > > for example  :
>
> > def func():
> >     for i in range(3):
>
> > >      for j in range(2):
> > >          if i>1 :
> > >             print i
> > >          else:
> > >             print j
> > > return dict() (or any statement ( eg, print 'hello')..)
>
> > > but invaliad syntax at return ...
> > > ??
> > > how do i fix ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Kuba Kucharski
I like Rocket too. I would like it to be better than Cherrypy

-- 
Kuba

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: about syntax in web2py

2010-03-19 Thread tandnk50
I'm sorry .
But my above code writeen in a action, the 'return dict()' is for the
action

On 19 Tháng Ba, 20:34, DenesL  wrote:
> return may only occur syntactically nested in a function definition,
> you don't have one.
>
> On Mar 19, 9:06 am, tandnk50  wrote:> I wrote 
> statements but invalid syntax and i don't know the problem,
> > for example  :
>
> def func():
>     for i in range(3):
>
> >      for j in range(2):
> >          if i>1 :
> >             print i
> >          else:
> >             print j
> > return dict() (or any statement ( eg, print 'hello')..)
>
> > but invaliad syntax at return ...
> > ??
> > how do i fix ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] tableless and customizable css forms

2010-03-19 Thread Alex Fanjul

Hi all,
Some of you can remember the recurrent discussion about "tableless and 
customizable css forms"...
There is a new feature in Yii framework about forms builder and there is 
-at least- a very interesting article about it here:

http://www.yiiframework.com/doc/guide/form.builder

It's so much curious that the aproach it's very similar to one which 
somebody told here (I dont remember well who was...)
Using a kind of separate classes to keep the render and the array of 
elements -buttons and input elements- including sub-forms...


maybe its a clue to improve the web2py system in this sense, regards
alex

El 19/03/2010 14:24, mdipierro escribió:

Clearly we have conflicting benchmarks. I like Rocket because it is
cleaner but we need to go with the fastest. Let's wait for Tim
response and we there is a disagreement I propose that a few more
people try reproduce the benchmarks (to make sure there is not
something weird in the setup) and then we decide what to do.

Massimo

On Mar 19, 5:36 am, Kuba Kucharski  wrote:
   

Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?
   

1. Tim?
2. I have a lot of free memory while testing

I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piëlhttp://nichol.as/benchmark-of-python-web-servers

In short he says:

 

make sure you do not use ab
   

yes, in my tests I use httperf

 

make sure you are running from other machine with limits also tweaked
   

this is done like that by me

 

use recompiled httperf
   

done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."

--
Kuba
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: about syntax in web2py

2010-03-19 Thread DenesL
return may only occur syntactically nested in a function definition,
you don't have one.

On Mar 19, 9:06 am, tandnk50  wrote:
> I wrote statements but invalid syntax and i don't know the problem,
> for example  :
>
def func():
for i in range(3):
>      for j in range(2):
>          if i>1 :
>             print i
>          else:
>             print j
> return dict() (or any statement ( eg, print 'hello')..)
>
> but invaliad syntax at return ...
> ??
> how do i fix ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread mdipierro
Clearly we have conflicting benchmarks. I like Rocket because it is
cleaner but we need to go with the fastest. Let's wait for Tim
response and we there is a disagreement I propose that a few more
people try reproduce the benchmarks (to make sure there is not
something weird in the setup) and then we decide what to do.

Massimo

On Mar 19, 5:36 am, Kuba Kucharski  wrote:
> >Are these numbers consistent with Tim numbers? Could this be dues to a
> >different memory usage?
>
> 1. Tim?
> 2. I have a lot of free memory while testing
>
> I wrote email to an author of the blog entry about wsgi webserver
> benchmarks - Nicholas Piëlhttp://nichol.as/benchmark-of-python-web-servers
>
> In short he says:
>
> >make sure you do not use ab
>
> yes, in my tests I use httperf
>
> >make sure you are running from other machine with limits also tweaked
>
> this is done like that by me
>
> >use recompiled httperf
>
> done already
>
> this also comes from him:
>
> "I did a quick benchmark after being pointed to Rocket and I could not
> see the same performance advantage for Rocket over CherryPy, more the
> opposite."
>
> --
> Kuba

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Performance of python webservers

2010-03-19 Thread mdipierro
serial web servers are faster (because no concurrency overhead) but
they are only appropriate when the requests are very fast (they do not
perform any complex operation) else other users have to wait in line
when a long running request is being processed. Not good for general
use.

On Mar 19, 7:41 am, Vasile Ermicioi  wrote:
> "for one of their services" not for all :)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Does the pdf manual differ from the online official web2py book a lot?

2010-03-19 Thread mdipierro
One month ago they were identical but the online one is a wiki so some
users have improved it, but no major differences yet.

On Mar 19, 3:37 am, zkingw  wrote:
> Hi, all:
>
> I came across web2py earlier this week, and I fall into love with it
> right away, and decided to learn it as my very first python web
> framework.
>
> I got the pdf version of the manual in hand, already finished the
> first two chapters, and move into the Core part, have to say that's
> one of the best tutorial. My question is that does the pdf manual
> differ from the online official book a lot? And what's the difference
> between those two versions exactly? I want to stay with the pdf manual
> as I can read it using my ebook reader which is really nice, but I
> dont want missing the important stuff because the version difference.
>
> thanks for your kindly advices.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] about syntax in web2py

2010-03-19 Thread tandnk50
I wrote statements but invalid syntax and i don't know the problem,
for example  :

for i in range(3):
 for j in range(2):
 if i>1 :
print i
 else:
print j
return dict() (or any statement ( eg, print 'hello')..)


but invaliad syntax at return ...
??
how do i fix ?


-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Recording voice samples from a web2py app

2010-03-19 Thread aure
Hello again,

dspiteself, I had a look to red5, and I have to admit that I do not
understand much about it yet.

If I manage to run a red5 server, would it possible to access it from
my web2py application? (Sorry, I am very new to such issues.)

Thank you,
Aurelien

On 18 mar, 23:54, dspiteself  wrote:
> There are several options most cost money and require a flash media
> server. Here is a freeish solutionhttp://fms.denniehoopingarner.com/
> if you can compile the flex to an swf and run your own red 5 server
> you are good to go.
>
> On Mar 18, 8:05 am, aure  wrote:
>
> > Hi everyone,
>
> > I would like to let some users record voice samples (read bits of
> > text) from a web2py application.
>
> > I imagine the user just clicks on a button to start the recording
> > process, reads the text, clicks to stop the recording. Listens to it.
> > And saves it if they are happy with it. Otherwise do the whole thing
> > again and again until they are satisfied.
>
> > My question is: can someone point me to such a recording application
> > that could be used in a web2py application?
>
> > Thanks in advance.
>
> > Aurelien

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Performance of python webservers

2010-03-19 Thread Vasile Ermicioi
"for one of their services" not for all :)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Performance of python webservers

2010-03-19 Thread Vasile Ermicioi
"Ebay is using FAPWS for one of their services."

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: routes.py not working

2010-03-19 Thread Vasile Ermicioi
yes, to apply changes in routes you need to restart web server

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: gae appadmin

2010-03-19 Thread Matt Murphy Garmur
i meant to say i upgraded to snow leopard (from tiger). that's what bumped
me to 2.6, i suppose.

matt

On Fri, Mar 19, 2010 at 7:13 AM, mattynoce  wrote:

> my mistake -- i upgraded to leopard and it started using python 2.6.
> it still worked with the old version (1.74.11) but not with the new.
> i'm sure that's the issue. sorry about that.
>
> the problem was manifesting itself by telling me it couldn't find
> wsgiserver but it seems that's irrelevant at this point. if you want a
> stack trace, i'll put the path back to 2.6 and print the error.
>
> thanks for the help.
>
> matt
>
> On Mar 18, 10:53 am, mdipierro  wrote:
> > wsgiserver is not used and not relavent when using GAE. GAE does not
> > use that module. Please try again and give a complete traceback.
> >
> > On Mar 18, 9:20 am, Matt Murphy Garmur 
> > wrote:
> >
> > > sorry for the mistyping -- it is with "appadmin" that i get the error.
> >
> > > i believe i've been using python 2.5 -- everything has been working for
> me
> > > for a year. i'll double check back at home.
> >
> > > the error in the launcher (with 1.76.5) was about file locking and
> > > wsgiserver. i followed another thread that suggested i open a python
> prompt
> > > for web2py and type "import wsgiserver," and it didn't find the module.
> >
> > > thanks for your help,
> >
> > > matt
> >
> > > On Thu, Mar 18, 2010 at 10:11 AM, mdipierro 
> wrote:
> > > > "appadmin" (not "admin") is supposed to work out of the box since
> > > > before 1.74.
> >
> > > > Make sure that you use Python 2.5.
> > > >  Do you see any error in the Launcher console?
> >
> > > > On Mar 18, 8:56 am, Matt Murphy Garmur 
> > > > wrote:
> > > > > i know that it should work out of the box, which is my problem. did
> it
> > > > work
> > > > > out of the box on 1.74.11, or is it more recent? because when i
> look at
> > > > it
> > > > > over https on my current version, i get the 400 bad request error.
> >
> > > > > and trying to upgrade to 1.76.5 makes the gae launcher not work on
> my
> > > > mac.
> > > > > so i feel kind of stuck.
> >
> > > > > if 1.74.11 didn't have gae working, i'll just wait for the next
> release
> > > > and
> > > > > hope it works with my launcher. has anyone else had a similar
> issue? i'd
> > > > > assume it's my programming, but a simple switch of the web2py
> folder from
> > > > > 1.74 to 1.76 makes the gae launcher either work or not so i figure
> it's
> > > > not
> > > > > me.
> >
> > > > > matt
> >
> > > > > On Wed, Mar 17, 2010 at 9:18 PM, mdipierro <
> mdipie...@cs.depaul.edu>
> > > > wrote:
> > > > > > I advice you use https and you do not remove the security checks.
> > > > > > https works out of the box on GAE anyway.
> >
> > > > > > On Mar 17, 7:03 pm, Richard  wrote:
> > > > > > > to use appadmin on GAE I had to either use https or comment out
> the
> > > > > > > security checks
> >
> > > > > > > On Mar 17, 12:16 pm, mattynoce  wrote:
> >
> > > > > > > > hi, i've looked at some posts but can't seem to make this
> work. i
> > > > can
> > > > > > > > get appadmin to work on my local version of gae launcher (on
> a
> > > > mac),
> > > > > > > > but when i upload it, i can't get it to work on app engine
> even
> > > > over
> > > > > > > > https.
> >
> > > > > > > > i tried to migrate from 1.74.11 to 1.76.5 but when i did
> that, i
> > > > > > > > couldn't get the gae launcher to show my site. i just kept
> getting
> > > > a
> > > > > > > > ticket error about wsgiserver. so i eventually rolled back to
> > > > 1.74.11.
> >
> > > > > > > > what do i need to do to be able to look at appadmin online? i
> just
> > > > get
> > > > > > > > "400 Bad Request."
> >
> > > > > > > > i apologize if i'm missing something. any thoughts?
> >
> > > > > > > > matt
> >
> > > > > > --
> > > > > > You received this message because you are subscribed to the
> Google
> > > > Groups
> > > > > > "web2py-users" group.
> > > > > > To post to this group, send email to web...@googlegroups.com.
> > > > > > To unsubscribe from this group, send email to
> > > > > > web2py+unsubscr...@googlegroups.com
> 
> >
> > > > 
> 
> >
> >
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/web2py?hl=en.
> >
> > > > --
> > > > You received this message because you are subscribed to the Google
> Groups
> > > > "web2py-users" group.
> > > > To post to this group, send email to web...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > web2py+unsubscr...@googlegroups.com
> 
> >
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You recei

[web2py] Re: routes.py not working

2010-03-19 Thread mr.freeze
Just to confirm, you are restarting the web server, yes?

On Mar 19, 7:16 am, Francisco Costa  wrote:
> Hello Vasile,
> Thank you for your help!
> I've changed my routes.py to
>
> routes_in = (
> ('/admin/(.*)', '/admin/$1'),
> ('/(.*)', '/init/$1'),
> )
>
> but /init/ still displays as you can see it here:http://bondiu.info
> I've also chmod the routes.py to 777 but no luck either
>
> On Mar 19, 11:50 am, Vasile Ermicioi  wrote:
>
> > you use init, sorry
>
> > routes_in = (
> > ('/admin/(.*)', '/admin/$1'),
> > ('/(.*)', '/init/$1'),
> > )
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: routes.py not working

2010-03-19 Thread Francisco Costa
Hello Vasile,
Thank you for your help!
I've changed my routes.py to

routes_in = (
('/admin/(.*)', '/admin/$1'),
('/(.*)', '/init/$1'),
)

but /init/ still displays as you can see it here: http://bondiu.info
I've also chmod the routes.py to 777 but no luck either

On Mar 19, 11:50 am, Vasile Ermicioi  wrote:
> you use init, sorry
>
> routes_in = (
> ('/admin/(.*)', '/admin/$1'),
> ('/(.*)', '/init/$1'),
> )

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Recording voice samples from a web2py app

2010-03-19 Thread aure
Thank you Yarko for your description of possible ways.

And thank you dspiteself for your link. It looks nice. I will take
another more in depth look at it later today.

Aurelien

On 18 mar, 23:54, dspiteself  wrote:
> There are several options most cost money and require a flash media
> server. Here is a freeish solutionhttp://fms.denniehoopingarner.com/
> if you can compile the flex to an swf and run your own red 5 server
> you are good to go.
>
> On Mar 18, 8:05 am, aure  wrote:
>
> > Hi everyone,
>
> > I would like to let some users record voice samples (read bits of
> > text) from a web2py application.
>
> > I imagine the user just clicks on a button to start the recording
> > process, reads the text, clicks to stop the recording. Listens to it.
> > And saves it if they are happy with it. Otherwise do the whole thing
> > again and again until they are satisfied.
>
> > My question is: can someone point me to such a recording application
> > that could be used in a web2py application?
>
> > Thanks in advance.
>
> > Aurelien

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] best web frameworks

2010-03-19 Thread Alex Fanjul

FYI:
http://www.bestwebframeworks.com/python/
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: routes.py not working

2010-03-19 Thread Vasile Ermicioi
you use init, sorry

routes_in = (
('/admin/(.*)', '/admin/$1'),
('/(.*)', '/init/$1'),
)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: routes.py not working

2010-03-19 Thread Vasile Ermicioi
or better this

routes_in = (
('/admin/(.*)', '/admin/$1'),
('/(.*)', '/999/$1'),
)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: routes.py not working

2010-03-19 Thread Vasile Ermicioi
try something like that

routes_in = (
('/([^(admin)]*)', '/init/$1'),
)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: gae appadmin

2010-03-19 Thread mattynoce
my mistake -- i upgraded to leopard and it started using python 2.6.
it still worked with the old version (1.74.11) but not with the new.
i'm sure that's the issue. sorry about that.

the problem was manifesting itself by telling me it couldn't find
wsgiserver but it seems that's irrelevant at this point. if you want a
stack trace, i'll put the path back to 2.6 and print the error.

thanks for the help.

matt

On Mar 18, 10:53 am, mdipierro  wrote:
> wsgiserver is not used and not relavent when using GAE. GAE does not
> use that module. Please try again and give a complete traceback.
>
> On Mar 18, 9:20 am, Matt Murphy Garmur 
> wrote:
>
> > sorry for the mistyping -- it is with "appadmin" that i get the error.
>
> > i believe i've been using python 2.5 -- everything has been working for me
> > for a year. i'll double check back at home.
>
> > the error in the launcher (with 1.76.5) was about file locking and
> > wsgiserver. i followed another thread that suggested i open a python prompt
> > for web2py and type "import wsgiserver," and it didn't find the module.
>
> > thanks for your help,
>
> > matt
>
> > On Thu, Mar 18, 2010 at 10:11 AM, mdipierro  wrote:
> > > "appadmin" (not "admin") is supposed to work out of the box since
> > > before 1.74.
>
> > > Make sure that you use Python 2.5.
> > >  Do you see any error in the Launcher console?
>
> > > On Mar 18, 8:56 am, Matt Murphy Garmur 
> > > wrote:
> > > > i know that it should work out of the box, which is my problem. did it
> > > work
> > > > out of the box on 1.74.11, or is it more recent? because when i look at
> > > it
> > > > over https on my current version, i get the 400 bad request error.
>
> > > > and trying to upgrade to 1.76.5 makes the gae launcher not work on my
> > > mac.
> > > > so i feel kind of stuck.
>
> > > > if 1.74.11 didn't have gae working, i'll just wait for the next release
> > > and
> > > > hope it works with my launcher. has anyone else had a similar issue? i'd
> > > > assume it's my programming, but a simple switch of the web2py folder 
> > > > from
> > > > 1.74 to 1.76 makes the gae launcher either work or not so i figure it's
> > > not
> > > > me.
>
> > > > matt
>
> > > > On Wed, Mar 17, 2010 at 9:18 PM, mdipierro 
> > > wrote:
> > > > > I advice you use https and you do not remove the security checks.
> > > > > https works out of the box on GAE anyway.
>
> > > > > On Mar 17, 7:03 pm, Richard  wrote:
> > > > > > to use appadmin on GAE I had to either use https or comment out the
> > > > > > security checks
>
> > > > > > On Mar 17, 12:16 pm, mattynoce  wrote:
>
> > > > > > > hi, i've looked at some posts but can't seem to make this work. i
> > > can
> > > > > > > get appadmin to work on my local version of gae launcher (on a
> > > mac),
> > > > > > > but when i upload it, i can't get it to work on app engine even
> > > over
> > > > > > > https.
>
> > > > > > > i tried to migrate from 1.74.11 to 1.76.5 but when i did that, i
> > > > > > > couldn't get the gae launcher to show my site. i just kept getting
> > > a
> > > > > > > ticket error about wsgiserver. so i eventually rolled back to
> > > 1.74.11.
>
> > > > > > > what do i need to do to be able to look at appadmin online? i just
> > > get
> > > > > > > "400 Bad Request."
>
> > > > > > > i apologize if i'm missing something. any thoughts?
>
> > > > > > > matt
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "web2py-users" group.
> > > > > To post to this group, send email to web...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > web2py+unsubscr...@googlegroups.com
> > > 
>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/web2py?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "web2py-users" group.
> > > To post to this group, send email to web...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > web2py+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Migrating web2py to GAE

2010-03-19 Thread Al
Thanks mdipierro. It is indeed the URL causing the problem, as it
defaults to "localhost" rather than "127.0.0.1" when I click the
Browse button after Run. I did not realise the code inside appadmin.py
actually checks for "127.0.0.1". Now I can really troubleshoot
myownapp to make it work on GAE

Al

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: routes.py not working

2010-03-19 Thread Francisco Costa
Hello!

I've tried lots of combinations but none seem to work.
I really would like to get rid of the /init/ in the url.

Does anyone knows what the problem may be?


On Mar 18, 7:08 pm, Francisco Costa  wrote:
> Hello
> I have step up an web2py project onhttp://bondiu.info
>
> I've started to edit the welcome application and I've made an init
> symbolic link to the welcome application.
> Now I pretend to remove the /init/ from the urls.
> This way I renamed routes.example.py toroutes.pyand made this
> changes
>
> routes_in = (
>   ('/$c/$f', '/init/$c/$f'),
> )
>
> routes_out = (
>   ('/init/$c/$f', '/$c/$f'),
> )
>
> as it says in the book:http://web2py.com/book/default/section/4/15
>
> Unfortunately the /init/ still appears.
> Any help on this?
> Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Kuba Kucharski
>Are these numbers consistent with Tim numbers? Could this be dues to a
>different memory usage?

1. Tim?
2. I have a lot of free memory while testing


I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piël
http://nichol.as/benchmark-of-python-web-servers

In short he says:

>make sure you do not use ab
yes, in my tests I use httperf

>make sure you are running from other machine with limits also tweaked
this is done like that by me

>use recompiled httperf
done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."



-- 
Kuba

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



  1   2   >