[web2py] Re: Limit Related Field Dropdown List

2010-11-21 Thread Joe J
lice/85<http://www.google.com/url?sa=D&q=http://www.web2pyslices.com/main/sli...> > > (thanks mr.freeze!!) > > kind regards, > Bernardo > > 2010/11/21 Joe J > > > Hi All, > >  Say I have a pet table and an owner table related to each other in a > >

[web2py] Limit Related Field Dropdown List

2010-11-21 Thread Joe J
Hi All, Say I have a pet table and an owner table related to each other in a one to many relationship (one owner has many pets). Each owner can also define several pet types of their choosing. db.create_table('owner', Field('name', text)) db.create_table('pet_type', Field('type_name','

[web2py] Re: Selecting subsets of objects in a controller.

2010-11-20 Thread Joe J
> > I do not understand the Django example since it is not using the > ord_id information. > > On Nov 20, 6:31 pm, Joe J wrote: > > > Hi All, > >   I have a one-to-many relationship between a table called "org" and a > > table called "eventtype".

[web2py] Selecting subsets of objects in a controller.

2010-11-20 Thread Joe J
Hi All, I have a one-to-many relationship between a table called "org" and a table called "eventtype". (one org can have many eventtypes). I'm trying to construct a controller function that can edit a eventtype belonging to a specific org. The URL might look something like: /app_name/eventtype

[web2py] Customize the Appearance of the menu

2010-11-17 Thread Joe J
Hi all, I'm looking to customize the appearance if the menu on a per controller basis. I found some code in the "old" book that seems to do this. However, when I try to run the below code, I get a "two many values to unpack error". Does anyone know who I might go about doing this? Any help is mu

[web2py] View ("Template") Variable Not defined

2010-10-13 Thread Joe J
Hi All, I have a quick question regarding the behavior of variables in view code. I'm my "upper level" layout, I'd like to define a variable called page_heading. If the controller passes a page_heading variable in it's dictionary to the view, I'd like it to display the contents of that variable.

[web2py] Re: Validators allow empty

2010-10-13 Thread Joe J
Thanks DenesL, I'll give that a try. Thanks for the advice. On Oct 13, 4:53 am, DenesL wrote: > Hi Joe, > > use IS_EMPTY_OR as in > > IS_EMPTY_OR(IS_EMAIL(error_message=T('Invalid email address.'))) > > Denes > > On Oct 13, 3:55 am, Joe J wrote: > &

[web2py] Validators allow empty

2010-10-13 Thread Joe J
This is probably an easy question, but I'm looking for a way to validate a field if it is given, but let it pass if it is empty. Currently, the following validator doesn't allow an empty string to be passed in. Is there an argument to the IS_EMAIL validator and other validators that allow it to ac

[web2py] 'DEMO_MODE' is not defined

2010-10-13 Thread Joe J
Hi all, I have a newly updated web2py install. If I create a new application and click on any controller associated with the appadmin.py, I get a DEMO_MODE is not defined error. This is before doing any sort of coding. Am I missing some sort of configuration setting? Any help is much appreciat