[web2py:28289] multiple joins to the same table

2009-08-10 Thread Richard
hello, I have something like the following tables: db.define_table('flavor', db.Field('name'), ) db.define_table('ice_cream', db.Field('f1', db.flavor), db.Field('f2', db.flavor), ) I am trying to form a query that will return all the ice creams with the name of each flavour. Note t

[web2py:28290] Re: New book. Chapters 6,7,8 again

2009-08-10 Thread Richard
- p217: Mail(globals()) -> Mail() On Jul 13, 5:17 am, Vidul wrote: > Thank you, Massimo, that's the most reliable forum on this planet (no > irony)! > > On Jul 12, 5:32 pm, mdipierro wrote: > > > Book ERRATA: > > > def give_create_permission(form): > >     group_id=auth.id_group('user_%s' % >

[web2py:28291] Re: New book. Chapters 6,7,8 again

2009-08-10 Thread Bottiger
Massimo are you going to release the chapters for the new DAL engine soon, or is it going to use the same API as this one? On Jul 11, 7:57 am, Massimo Di Pierro wrote: > Chapters 7 and 8 have been revised including corrections from Mr   > Admin, Fran and Jonathan. > >  web2py_manual_678.pdf > 19

[web2py:28292] Re: multiple joins to the same table

2009-08-10 Thread mdipierro
fla1=db.favor.with_alias('fla1') fla2=db.favor.with_alias('fla2') db(db.ice_cream.f1==fla1.id)(db.ice_cream.f2==fla2.id).select (db.ice_cream.id,fla1.name,fla2.name) On Aug 10, 2:59 am, Richard wrote: > hello, I have something like the following tables: > > db.define_table('flavor', >     db.Fi

[web2py:28293] Re: New book. Chapters 6,7,8 again

2009-08-10 Thread mdipierro
I will release the book before the new DAL but the new DAL will be backward compatible. The only differences will be inside. The new DAL is taking longer then expected and I apologize but there is not really much pressure to get it done. Massimo On Aug 10, 3:15 am, Bottiger wrote: > Massimo are

[web2py:28294] Re: New book. Chapters 6,7,8 again

2009-08-10 Thread Peterle
At page 15 (f.i.) I've found a bit tiring the font choise. A minor issue, but IMO it would be better if you use the same font or at least the same font-height, and a better separation between code and explanation. A good job, however. --- On 11 Lug, 16:57, Massimo Di Pierro wrote

[web2py:28295] Re: How to best tackle data access authorizations

2009-08-10 Thread Benigno
Massimo, Thank you for your answer. Before moving on, let me try to give a quick example of a table: db.define_table('resources', Field('name',label=T('name')), Field('company',db.company,label=T('category')), Field('department',db.department,label=T('department')), Field('long_desc

[web2py:28296] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-10 Thread Timbo
I tried to get a PASE version running a while ago with no luck. But I am not adept at AS400 use. You could try ActivePython's distribution: http://www.activestate.com/activepython/downloads Let me know how it goes. I would love to be able to move some of my apps over to our AS400 for nothing

[web2py:28297] cancel using {{=form.custom}} but cant get it to work

2009-08-10 Thread Dutch opera
Hi, I=have the form form=auth.retrieve_password() form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick="window.location='%s';"%URL (r=request,f='login'))) In my view,,, I want to do this {{=form.custom.begin}} {{=form.custom.widget.email}} {{=form.custom.submit}} {{=form.custo

[web2py:28298] how to use a verbosly name in the model table

2009-08-10 Thread Carlos Aboim
Hi folks, My question is very simple, making me so ashamed... I intend to use non ascii caracters in a model field description, so how do I use a verbose name in the model table? Kind of: SQLField('descricao', string, verbose='descição') # ---> maybe not correct!! By the way, how do I insert

[web2py:28299] Re: Converting a Django Tutorial to web2py

2009-08-10 Thread __future__
...bump On Aug 9, 6:50 pm, __future__ wrote: > I have a lot of this working but I am stuck on getting individually > submitted values from the request... > > the model:http://pastebin.com/d2ddf4718 > the controller:http://pastebin.com/d74b1a1e2 > the 'tonight' view:http://pastebin.com/d6746076d

[web2py:28300] Re: how to use a verbosly name in the model table

2009-08-10 Thread Benigno
Carlos, I am not completelly sure I understand you, but I think that what you are looking for is: Field('description',label=T('desccição')), or even without the T if you are not going to be doing any further translations. Field('descricao','string',label='descição'). The string part is not n

[web2py:28301] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-10 Thread DenesL
Well that is the thing Tim, this is more of an AIX issue than an AS400 one. My expertise is on AS400 not AIX. Plus PASE is just a run time environment, it is not full AIX. So unless I can get a precompiled version of Python 2.5 (or 2.6) for AIX5.2 PowerPC (maybe even AIX5.1), or a compiled hashli

[web2py:28302] Re: New book. Chapters 6,7,8 again

2009-08-10 Thread DenesL
On Aug 10, 4:17 am, mdipierro wrote: > I will release the book before the new DAL but the new DAL will be > backward compatible. The only differences will be inside. The new DAL > is taking longer then expected and I apologize but there is not really > much pressure to get it done. I beg to diff

[web2py:28303] Re: Template syntax for comments

2009-08-10 Thread Olivier
On Aug 5, 3:57 pm, mdipierro wrote: > You can comment individual lines {{#}}. To comment an a multiline > block {{""""""} should work. What problem do you have with it? If there are '{{}}' syntax in the comments, an error is thrown: Traceback (most recent call last): File "/home/oli/w

[web2py:28304] Re: how to use a verbosly name in the model table

2009-08-10 Thread Carlos Aboim
Hi Benigno, I think it should be working but I get the following error. http://dpaste.com/hold/9/ I ask for help from the group! can anyone tlme what's going wrong?? thanks Carlos Aboim 2009/8/10 Benigno > > Carlos, >I am not completelly sure I understand you, but I think that what >

[web2py:28305] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-10 Thread DenesL
On a related note: "Ruby Is Catching On, Time For An i Port" http://www.itjungle.com/tfh/tfh080309-story05.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email

[web2py:28306] Re: how to use a verbosly name in the model table

2009-08-10 Thread Carlos Aboim
Hi everybody, Solved!! Should be a list, and not a dictionay!! Sorry for the inconvinience! Carlos Aboim 2009/8/10 Carlos Aboim > Hi Benigno, > > I think it should be working but I get the following error. > > http://dpaste.com/hold/9/ > > I ask for help from the group! > > can anyone tlme

[web2py:28307] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-10 Thread Timbo
The link I included has an AIX 5.x version of Python which I used at a former employer. It works very well on AIX, I just had trouble with AS400 PASE. What I'm saying is, I was an AS400 noob at the time and so I could hardly tell the difference between PASE and OS400. It might still be a viable

[web2py:28308] Automation for application test/debug

2009-08-10 Thread MikeEllis
I've got a web2py application running on a PDA (Nokia 810). The application controls a larger system of devices that are physically moving within a WiFi network. The PDA is also in motion. The web2py app is working very well, but we are encountering lower level problems (failed connections, s

[web2py:28309] Re: How to best tackle data access authorizations

2009-08-10 Thread mdipierro
On Aug 10, 3:25 am, Benigno wrote: > Massimo, > >     Thank you for your answer.  Before moving on, let me try to give a > quick example of a table: > > db.define_table('resources', >   Field('name',label=T('name')), >   Field('company',db.company,label=T('category')), >   Field('department',db

[web2py:28310] Re: cancel using {{=form.custom}} but cant get it to work

2009-08-10 Thread mdipierro
You cannot modify a form and then use a custom form. You need to add the button in the custom form. {{=form.custom.begin}} {{=form.custom.widget.email}} {{=form.custom.submit}} {{=form.custom.end}} On Aug 10, 8:28 am, Dutch opera wrote: > Hi, > > I=have the form > > form=auth.retrieve_password

[web2py:28311] Re: Converting a Django Tutorial to web2py

2009-08-10 Thread mdipierro
Sorry, I will answer by tomorrow. Massimo On Aug 10, 8:56 am, __future__ wrote: > ...bump > > On Aug 9, 6:50 pm, __future__ wrote: > > > I have a lot of this working but I am stuck on getting individually > > submitted values from the request... > > > the model:http://pastebin.com/d2ddf4718 >

[web2py:28312] Re: New book. Chapters 6,7,8 again

2009-08-10 Thread mdipierro
The main advantage of the new dal is the ability to easily add adaptors for new backends and map virtual fieldnames into actual fieldnames. This does not mean you will be able to access legacy databases that you cannot access today. In fact the only and main issue is with fields that lack autoincr

[web2py:28313] Re: Template syntax for comments

2009-08-10 Thread mdipierro
I will look. On Aug 10, 10:28 am, Olivier wrote: > On Aug 5, 3:57 pm, mdipierro wrote: > > > You can comment individual lines {{#}}. To comment an a multiline > > block {{""""""} should work. What problem do you have with it? > > If there are '{{}}' syntax in the comments, an error is t

[web2py:28314] Re: multiple joins to the same table

2009-08-10 Thread DenesL
fla1=db.flavor.with_alias('fla1') fla2=db.flavor.with_alias('fla2') r=db().select(db.ice_cream.id,fla1.name,fla2.name, left=[fla1.on(db.ice_cream.f1==fla1.id), fla2.on(db.ice_cream.f2==fla2.id)]) --~--~-~--~~~---~--~~ You received this message because y

[web2py:28315] Re: Converting a Django Tutorial to web2py

2009-08-10 Thread mdipierro
It seems to me this works event_id = int(request.vars.event_id) #this does not work but this does not because auth.user should be auth.user.id. if db((db.attendance.event==event_id) & (db.attendance.user==auth.user)).select(): db((db.attendance.event==event_id) & (db.attendance.

[web2py:28316] Re: viability test on IBM AS/400 i5 iSeries ...

2009-08-10 Thread DenesL
Thanks, but when I try to unpack ActivePython-2.5.4.4-aix5- powerpc.tar.gz I get: tar: 0511-169 A directory checksum error on media; 1249928580 not equal to 41132 Which one did you try?. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:28319] Re: Template syntax for comments

2009-08-10 Thread mdipierro
{{ and }} have precedence over everything else in the views. This means you cannot have }} in comments. This is by design because it reduces the scope of the possible errors you can have. If you have a }} in a comment you need to add a space in between as in } } Massimo On Aug 10, 10:28 am, Oli

[web2py:28320] Re: Converting a Django Tutorial to web2py

2009-08-10 Thread __future__
Thanks. On Aug 10, 2:33 pm, Massimo Di Pierro wrote: > @__future__ > > I made some improvements using a LEFT join in tonight and "attending/ > not attending" using AJAX. > > Massimo > >  events.zip > 3KViewDownload --~--~-~--~~~---~--~~ You received this message b

[web2py:28321] Calendar

2009-08-10 Thread FERNANDO VILLARROEL
Dear all, I am trying use calendar on a simple form as below: def llamados(): hoy=time.time() desde=time.strftime('%d-%m-%Y 00:00:00',time.localtime(desde)) hasta=time.strftime('%d-%m-%Y %H:%M:%S',time.localtime(hoy)) lineas=db(db.accountcode.id_clientes==session.cliente_id).select(d

[web2py:28322] Re: Calendar

2009-08-10 Thread Jonathan Lundell
On Aug 10, 2009, at 4:48 PM, FERNANDO VILLARROEL wrote: > > Dear all, > > I am trying use calendar on a simple form as below: > > def llamados(): > > > hoy=time.time() > desde=time.strftime('%d-%m-%Y 00:00:00',time.localtime(desde)) > hasta=time.strftime('%d-%m-%Y %H:%M:%S',time.localtime(hoy)) >

[web2py:28323] Re: feature request: activate the feature request template

2009-08-10 Thread Richard
hello, > You know that currently the main repository is on launchpad.net? Currently the Google Code page says "Here you find only the development version ...", while the Launchpad page says "Does not use Launchpad for development." That to me sounds like Google Code is the development repository

[web2py:28324] Re: multiple joins to the same table

2009-08-10 Thread Richard
thanks! - I forgot about that trick On Aug 11, 4:44 am, DenesL wrote: > fla1=db.flavor.with_alias('fla1') > fla2=db.flavor.with_alias('fla2') > r=db().select(db.ice_cream.id,fla1.name,fla2.name, >   left=[fla1.on(db.ice_cream.f1==fla1.id), >         fla2.on(db.ice_cream.f2==fla2.id)]) --~--~---

[web2py:28325] Re: Calendar SOLVED

2009-08-10 Thread FERNANDO VILLARROEL
Thank you Jonathan, now works fine. --- On Mon, 8/10/09, Jonathan Lundell wrote: > From: Jonathan Lundell > Subject: [web2py:28322] Re: Calendar > To: web2py@googlegroups.com > Date: Monday, August 10, 2009, 8:56 PM > > On Aug 10, 2009, at 4:48 PM, FERNANDO VILLARROEL wrote: > > > > > Dear a

[web2py:28326] Re: Calendar SOLVED

2009-08-10 Thread Jonathan Lundell
On Aug 10, 2009, at 6:04 PM, FERNANDO VILLARROEL wrote: > > Thank you Jonathan, now works fine. Good, I'm glad to hear it. Notice that, independent of the calendar widget, HTML itself requires that all IDs on a page be unique. Lots of stuff will work OK if you violate the rule, but it's goo

[web2py:28327] Calendar Setup

2009-08-10 Thread FERNANDO VILLARROEL
Regarding of the calendar. How i can use calendar with today in format day-month-year? hoy=time.time() desde=time.strftime('%d-%m-%Y 00:00:00',time.localtime(hoy)) INPUT(_type="datetime",_name="desde",_value=hoy,_class='datetime',_id="datetlimite", requires=IS_DATETIME())) if i use this form

[web2py:28328] Cannot upload file to GAE

2009-08-10 Thread Jon Romero
I have this table: db.define_table('site', Field('pic1', 'upload', uploadfield='data', label = "Banner (125x125)"), Field('data','blob',default='')) I also changed this in my controller: def download(): return site[db.site.pic1.uploadfield] Now I have some que

[web2py:28329] Re: Question about validation

2009-08-10 Thread weheh
I, too, am wondering why this should be so. I just ran into this issue with an api that I'm developing. The api needs to do an insert of a field called 'name' that requires=[IS_NOT_EMPTY(),IS_IN_DB(...)]. It seems redundant that I should have to do this an error check that the name argument is not

[web2py:28330] Re: On customizing auth_user

2009-08-10 Thread suiato
as for translation of auth messages, found in we2py-developers Álvaro is working on it with Massimo. he's testing. wish him success! -- Teru On 8月10日, 午前5:14, suiato wrote: > 2009/8/9 suiato : > > > > > Thanks, Yarko and Massimo > > > Yes, translation of messages in auth without T() worked :-)