Branko I used the idea from your second solution,

I created a dictionary within my index.py

def bio():
        bio = db.select('bio')
        bioInfo = {}
        for i in bio:
            bioInfo['first'] = i.bio_first
            bioInfo['last'] = i.bio_last
            bioInfo['url'] = i.bio_url
            bioInfo['description'] = i.bio_description
            bioInfo['phone'] = i.bio_phone
            bioInfo['email'] = i.bio_email
        return bioInfo

then within my base html layout I have,

    <aside>
        <p>
        $bio['first']
        $bio['last']
        </p>
        <p>
        $bio['description']
        $bio['url']
        $bio['phone']
        $bio['email']
        </p>
    </aside>

The dictionary provided a little bit more control than a list.
This solution works, but if there is a way to just do

def bio():
    return db.select('bio')

Then reference it in the base layout like,
$for b in bio:
    $b.bio_first
    $b.bio_last
   .....so on and so forth

I feel that would be less code and less convoluted way of doing
things.

Thanks for your time and help Branko, any more suggestions or ideas
would be appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to