[web2py:10473] Re: MVC and where data or information is developed

2008-10-19 Thread billf
It sounds interesting. One question: if today=Wednesday and the record date=Tuesday do you categorise the record as "yesterday", "this week", "this month" or possibly all 3? Ignoring that for the time being, my first thought is two functions. The view function takes 2 dates - "today" and the rec

[web2py:10472] Re: sqldesigner again

2008-10-19 Thread yarko
that was a slip! I meant to say: "...out of the string fields I tried to create" On Oct 19, 11:10 pm, yarko <[EMAIL PROTECTED]> wrote: > I tried to create a couple of linked tables as well - out of the > string integers I tried to create, only one was declared as string in > the web2py generat

[web2py:10471] Re: sqldesigner again

2008-10-19 Thread yarko
I tried to create a couple of linked tables as well - out of the string integers I tried to create, only one was declared as string in the web2py generated snippet; also the constraint required a lot of hand editing as it was malformed... Anyway, the concept is good - needs some more testing / fe

[web2py:10466] Re: sqldesigner again

2008-10-19 Thread Boris Manojlovic
Hi Steve, no, only things that i have been working on are XSLT transformation of xml generated with "www sql designer" - that nice gui you see :) and second thing is wrapping it into web2py as application that is NOT perfect as it rely on routes.py but is functional enough. I didn't wanted to cha

[web2py:10468] Re: model choice from list

2008-10-19 Thread mdipierro
>labels = (T('Freshman'), T('Sophomore'),T('Junior'), T('Senior'), > T('Graduate')) Works >labels = (T('Freshman', 'Sophomore','Junior', 'Senior', 'Graduate')) Does not work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[web2py:10470] Re: MVC and where data or information is developed

2008-10-19 Thread mdipierro
I like both your ideas. I do not really have any good suggestions but I would like to seem both of them implemented. Massimo On Oct 19, 6:56 pm, "Steve Shepherd" <[EMAIL PROTECTED]> wrote: > Hi > I am designing a class that works like a display and edit list (for using > alongside soething like

[web2py:10469] Re: sqldesigner again

2008-10-19 Thread mdipierro
Hi Boris, I only seem to be able to create integer fields. Am I doing something wrong? Massimo On Oct 19, 6:38 pm, "Boris Manojlovic" <[EMAIL PROTECTED]> wrote: > Hi Steve, > > no, only things that i have been working on are XSLT transformation of xml > generated with "www sql designer" - that

[web2py:10467] MVC and where data or information is developed

2008-10-19 Thread Steve Shepherd
Hi I am designing a class that works like a display and edit list (for using alongside soething like itemize in T2) So her goes: Its called SQLVIEW I want to hook this to a table (that is developed in DAL) and the SQLVIEW class automatically adds some methods and helpers. But I have a question

[web2py:10465] Re: model choice from list

2008-10-19 Thread Steve Shepherd
Massimo You might want to update the Cheatsheet. That is VERY useful. This way we can do this I presume: values = ( 'FR','SO','JR','SR','GR') labels = (T('Freshman'), T('Sophomore'),T('Junior'), T('Senior'), T('Graduate')) or labels = (T('Freshman', 'Sophomore','Junior', 'Senior', 'Grad

[web2py:10464] Re: custom forms - a suggestion

2008-10-19 Thread billf
This is where my lack of knowledge of python lets me down - I just didn't know that you could override a method like that. I will have a play. On Oct 19, 11:33 pm, mdipierro <[EMAIL PROTECTED]> wrote: > I have not had the time but I do like your second solution. You can do > > SQLFORM.myfunc=lam

[web2py:10463] Re: sqldesigner again

2008-10-19 Thread Steve Shepherd
Boris THIS is FANTASTIC...did you do all this yourself? This will leap web2py into the frameworks that beat RoR into submission for us python fans. IMPORTANT: The only question I have is will it support supersets and subset type definitions. I will give it a try. Massimo@ PLEASE make this the d

[web2py:10462] Re: custom forms - a suggestion

2008-10-19 Thread mdipierro
I have not had the time but I do like your second solution. You can do SQLFORM.myfunc=lambda self: myfunc(self) Anyway, If I am not mistaken you only need myfunc in views hence I am not sure you need it to be a method of SQLFORM, it could simply be a normal function that acts on the form. Massi

[web2py:10461] Re: t2 and stamp columns

2008-10-19 Thread yarko
RE: rtld: (run time link editor): you might try asking on http://bazaar-vcs.org/BzrSupport I prefer using any configuration management "get" to tarballs, as it will merge my local changes... less work for me. YMMV On Oct 19, 3:00 pm, billf <[EMAIL PROTECTED]> wrote: > Ok - apologies all round

[web2py:10460] Re: t2 and stamp columns

2008-10-19 Thread mdipierro
for now I will post both. On Oct 19, 2:00 pm, billf <[EMAIL PROTECTED]> wrote: > Ok - apologies all round.  I read the the new method as > new_filter_fields (unlikely I know) and consequently didn't find it in > the source. > > So I tested the changes and the new version looks great - "stamp" > c

[web2py:10459] Re: t2 and stamp columns

2008-10-19 Thread billf
Ok - apologies all round. I read the the new method as new_filter_fields (unlikely I know) and consequently didn't find it in the source. So I tested the changes and the new version looks great - "stamp" columns not exposed and modified_on gets stamped on update - and created_on doesn't ;-) Man

[web2py:10458] Re: custom forms - a suggestion

2008-10-19 Thread billf
Massimo Did you get a chance to look at my modifications to html.py? FYI I have looked at creating a solution outside of the core web2y files either as a totally separate class or extending SQLFORM. The former is based on the idea of extracting the necessary form values from the standard SQLFOR

[web2py:10457] Re: t2 and stamp columns

2008-10-19 Thread yarko
.and create() and update() refers to it On Oct 19, 2:12 pm, yarko <[EMAIL PROTECTED]> wrote: > Sorry - I was looking at that directory compare backwards - the link > that Massimo posted in this thread indeed DOES have the modules/t2.py > that includes: > > def _filter_fields() > > Try dow

[web2py:10456] Re: t2 and stamp columns

2008-10-19 Thread yarko
Sorry - I was looking at that directory compare backwards - the link that Massimo posted in this thread indeed DOES have the modules/t2.py that includes: def _filter_fields() Try downloading it again... On Oct 19, 2:08 pm, yarko <[EMAIL PROTECTED]> wrote: > billf - > > I checked the contents of

[web2py:10455] Re: t2 and stamp columns

2008-10-19 Thread yarko
billf - I checked the contents of this link tar - fiter fields are indeed NOT in that tar; You might be able to get away w/ just downloading modules/t2/py to update from launchpad (you won't need to in stall bazaar that way) => looks like launchpad source server might be having trouble this after

[web2py:10454] Re: Testing in web2py

2008-10-19 Thread yarko
Thanks for all this, Timbo! Looking forward to hearing more on your experience, thoughts with this. Yarko On Oct 19, 9:54 am, Timbo <[EMAIL PROTECTED]> wrote: > Since the start of this thread, I've only just looked into using > Selenium RC and how to integrate that with web2py.  I haven't come

[web2py:10449] Re: Testing in web2py

2008-10-19 Thread Timbo
Since the start of this thread, I've only just looked into using Selenium RC and how to integrate that with web2py. I haven't come up with a "good" solution yet, but I'll keep you posted. How does selenium compare with other products? I haven't used anything else, but a cursory look at the two

[web2py:10453] Re: Google App Engine with web2py and high cpu cycles / slow response time

2008-10-19 Thread Boris Manojlovic
Hello, please look into this, as this is what GAE really can do for us and code caching http://code.google.com/appengine/docs/python/appcaching.html Boris On Sun, Oct 19, 2008 at 5:41 PM, Robin B <[EMAIL PROTECTED]> wrote: > > The 12ms to 3ms speedup was measured using the @logstats decorator,

[web2py:10451] Re: Google App Engine with web2py and high cpu cycles / slow response time

2008-10-19 Thread Robin B
The 12ms to 3ms speedup was measured using the @logstats decorator, and is after the first request once the framework is warmed up (loaded) and a very simple controller/function that prints "hello world" with no view/layout and a 0.py model that defines one function. I wanted to eliminate as many

[web2py:10452] Re: model choice from list

2008-10-19 Thread Kacper Krupa
Thank you very much! Works! :) On Oct 19, 4:53 pm, mdipierro <[EMAIL PROTECTED]> wrote: > Hi Kacper, > Using the same Django example: > >     values = ( 'FR','SO','JR','SR','GR') >     labels = ('Freshman', 'Sophomore','Junior', 'Senior', 'Graduate') > >     db.mytable.myfield.requires=IS_IN_SET(

[web2py:10450] Re: t2 and stamp columns

2008-10-19 Thread mdipierro
I will double check tomorrow from the office. I am puzzled. Massimo On Oct 19, 5:43 am, billf <[EMAIL PROTECTED]> wrote: > No such string in the version I downloaded. I'll give bazaar a > try :-) > > On Oct 18, 11:53 pm, mdipierro <[EMAIL PROTECTED]> wrote: > > > We should have a version number

[web2py:10448] Re: model choice from list

2008-10-19 Thread mdipierro
Hi Kacper, Using the same Django example: values = ( 'FR','SO','JR','SR','GR') labels = ('Freshman', 'Sophomore','Junior', 'Senior', 'Graduate') db.mytable.myfield.requires=IS_IN_SET(values, labels) (if no labels, values are used as labels) Massimo On Oct 19, 7:09 am, Kacper Krupa

[web2py:10447] model choice from list

2008-10-19 Thread Kacper Krupa
Hello, I have a problem - i was searching a while and didn't find any good advice. I want to create a choice form in model, but the options are from list. Something like model relations but not to other table -- just to a python list! (Something like choices parametr in Django -> http://docs.djan

[web2py:10446] Re: t2 and stamp columns

2008-10-19 Thread billf
No such string in the version I downloaded. I'll give bazaar a try :-) On Oct 18, 11:53 pm, mdipierro <[EMAIL PROTECTED]> wrote: > We should have a version number, both in web2py and in T2. > > Anyway, I am pretty sure I posted > > http://mdp.cti.depaul.edu/examples/static/web2py.app.plugin_t2.t

[web2py:10445] Re: Google App Engine with web2py and high cpu cycles / slow response time

2008-10-19 Thread mdipierro
So I am not the only not sleeping tonight. ;-) 12ms is fantastic already. We should have a page with these numbers! Massimo On Oct 19, 3:42 am, Robin B <[EMAIL PROTECTED]> wrote: > Make sure you have edited app.yaml skipfiles section to upload .pyc > (it will skip upoading .pyc by default). > >

[web2py:10444] Re: Google App Engine with web2py and high cpu cycles / slow response time

2008-10-19 Thread Robin B
Make sure you have edited app.yaml skipfiles section to upload .pyc (it will skip upoading .pyc by default). On the most trivial app it takes 12ms with no caching, and using RAM caching I can get 3ms. Robin On Oct 19, 3:30 am, mdipierro <[EMAIL PROTECTED]> wrote: > Justin, this is fantastic, >

[web2py:10443] Re: Google App Engine with web2py and high cpu cycles / slow response time

2008-10-19 Thread mdipierro
Justin, this is fantastic, I think we are learning something here: 1) GAE takes 912-16=896ms to import and bytecode compile the gluon/ *.py modules and takes 16ms to execute the models/views/controllers. 2) GAE can cache the former pyc files when requests/seconds is above some threshold. I thi