Ivo Looser wrote:

> Hi Together
>
> By trying some usecases i got some points what i'm not sure.
>
> 1. what the best way to access the static directory. I'm use currently
> /static/images/myimg.jpg

from a template that would be ${std.url('/static/images/myimg.jpg')},
though maybe there is a better way which I'm unaware of...

>
> 2. How i can add Default records to my Database after they are created?
>

I'm not sure I understand your questioin... If you want to make default
records after the database is created your best bet is to make a script
that adds them.

> 3. can i use own controller classes outside from controller.py?

Sure:

from yourmoudle import your_controller

class Root(controllers.RootController):
    your_controller = your_controller()

>
> 4. Can i make my own widgets or how i can parse just a "Template
> string" and return the end html to my template? Is it possible to
> parse Javascript in a way like this? <script
> type="text/javascript">alert(${test})</script>

Of course you can! Though right now there is some lack of documentation
regarding this... your best option is to look at
http://trac.turbogears.org/turbogears/browser/trunk/turbogears/widgets/forms.py
and take some examples from there and
http://trac.turbogears.org/turbogears/browser/trunk/turbogears/widgets/tests/test_widgets.py
to see how the should behave. If you want to share them be sure to post
the at the Trac! (with the corresponding tests if possible)

Hope it helps,

Alberto

Reply via email to