On Mon, Aug 25, 2008 at 2:19 AM, Boštjan Jerko <[EMAIL PROTECTED]> wrote: > > Hello! > > I'd like to change field in the database when I click the button on > the page. I've "connected" python script in the kid template to the > button > but I don't know how to access table from the database in the kid template. > Please do not do this, it violates the MVC architecture, you should be doing that in the controller code and then pass the result to the templates for display. Have your button call a controller, then update the field and (re)render the template.
> I tried something like that: > > <?python > from model import table_name > def function(indata): > outdata=table_name.select().indata > ?> > > I only get the following error message: > SyntaxError: unqualified exec is not allowed in function '_pull' it > contains a nested function with free variables (news.py, line 27) > > Boštjan > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

