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

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

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

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

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

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

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

2010-12-01 Thread mdipierro
There is no "label" for the table because the name of the table does not show up in any generated forms except, as you say, in appadmin. But appadmin is not quite the same of Django admin. It is designed for the administrator, not for the users. Massimo On Dec 2, 12:48 am, Kostas M wrote: > Spea

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

2010-12-01 Thread Kostas M
Speaking of table names, I have a question: In Django models, when defining a table e.g. "Unit", there is the ability to adjust the name of the table when it is shown in the admin app, using the Meta class as 'verbose_name' for single, and 'verbose_name_plural' for plural: class Unit(models.Model

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

2010-12-01 Thread Branko Vukelic
On Wed, Dec 1, 2010 at 1:08 PM, villas wrote: >> And now... gender preferences: anyone would like to discuss on that?  ;-) > > OK > +1 single women  :) Btw, a table for single women should be "single woman". -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: ht

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

2010-12-01 Thread Branko Vukelic
On Wed, Dec 1, 2010 at 1:08 PM, villas wrote: >> And now... gender preferences: anyone would like to discuss on that?  ;-) > > OK > +1 single women  :) +1 -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: h

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

2010-12-01 Thread villas
> And now... gender preferences: anyone would like to discuss on that?  ;-) OK +1 single women :)

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

2010-12-01 Thread Michele Comitini
+1 singular And now... gender preferences: anyone would like to discuss on that? ;-) 2010/12/1 cjrh : > On Nov 30, 11:48 pm, pbreit wrote: >> Sorry for the newbie, religious question but what is the preference in >> web2py for table names, plural or singular? > > +1 for singular.

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

2010-12-01 Thread cjrh
On Nov 30, 11:48 pm, pbreit wrote: > Sorry for the newbie, religious question but what is the preference in > web2py for table names, plural or singular? +1 for singular.

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

2010-11-30 Thread mdipierro
when the dal was designed I has singular in mind. On Nov 30, 4:11 pm, DenesL wrote: > +1 for singular, it does look better in the code. > > On Nov 30, 4:48 pm, pbreit wrote: > > > Sorry for the newbie, religious question but what is the preference in > > web2py for table names, plural or singula

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

2010-11-30 Thread DenesL
+1 for singular, it does look better in the code. On Nov 30, 4:48 pm, pbreit wrote: > Sorry for the newbie, religious question but what is the preference in > web2py for table names, plural or singular? Most of the docs seem to > indicate singular since that seems to make more sense in code (and