not sure how the two dots got in there, but it should only be one dot. c.userprofile.firstname
huy > Hi Huy, > > is the formatting right; I did´nt know about that, seems strange, > > c follwed by two dots? Is this documented somewhere? I´ll like to read > it up > > > > On Oct 4, 5:41 am, Contact 42 <[EMAIL PROTECTED]> wrote: > >> voltron wrote: >> >>> here is an example of how I render data to forms >>> >>> def preview_profile(self): >>> if not session.has_key("logged_in"): >>> return render('/index.tmpl') >>> else: >>> >>> store = Store(database) >>> c.username = session["username"] >>> >>> # USER PROFILE >>> ==================================================== >>> >>> userprofile = store.find(Profile,Profile.user_id == >>> int(session["user_id"])).one() >>> if userprofile is None: >>> print " ==========================" >>> print "" >>> print "profile does not exist" >>> >>> #response.headers['Cache-Control']='no-cache, no- >>> store, must-revalidate' >>> return render('/my_profile.tmpl') >>> else: >>> >>> c.firstname = userprofile.firstname >>> c.lastname = userprofile.lastname >>> c.title = userprofile.title >>> c.profession = userprofile.profession >>> c.homepage = userprofile.homepage >>> c.street = userprofile.street >>> c.city = userprofile.city >>> >> any reason why you don't do >> >> c.userprofile = userprofile >> >> then in the template you can do >> >> c.userprofile..firstname >> c.userprofile..lastname >> >> huy >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---