Boštjan Jerko schrieb:
> 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

Please learn a bit more about the paradigms and terminology by going
through the tutorials before starting to use TurboGears. Otherwise
you'll quickly become frustrated. For instance, TG does not use "python
scripts" (like CGI), but "controllers".

> I tried something like that:
> <?python
>  from model import table_name
> def function(indata):
>    outdata=table_name.select().indata
> ?>

Don't do that. Fetch and prepare all your data in the controller and
pass them to the template (the "view").

Remember, views should be kept stupid:
http://www.youtube.com/watch?v=ku3QkWcPSEw&feature

Also, you usually don't want to access table_names, but model objects.
Try to get acquainted with SQLObject or SQLAlchemy.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to