If you don't want to do any DB interaction, I think you could just edit
controllers/template.py for now and make it render specified templates like
in it's documentation in that file. About common "header/footer". You can
just make a base template where you add ${next.body()} command, and in real
pages, you make <%inherit file="base.html"/>. If you need to make reusable
components, create some file with "widgets" and define <%def>'s there, then
add it as a namespace (<%namespace name="widgets" file="widgets.html"/>) and
then use like ${widgets.defname()}. BTW, default Pylons project still uses
Myghty as a template engine, if you didn't change it already, edit
config/middleware.py, find config.init_app there and add an argument
template_engine='mako'. And read docs, they are nice :-D

On 4/20/07, Heather <[EMAIL PROTECTED]> wrote:
>
>
> I've been reading through stuff on the pylons site for the past few
> days and feel like I'm not really getting anywhere.  But I'm a girl
> and have no problem asking for directions :)
>
> What I want to do is pretty simple.  I want to build a site for my
> son's school so there really isn't much fanciness involved.  I have
> pylons whatever the latest version is, mako (because I read that's
> where you're headed), and SQLAlchemy (no good reason).  So what now?
> Start me off.  My index.html file goes in the template directory, no?
> How do I make it show up?  I make a controller class maybe?  Give me
> an example.  I want all my pages to have an in common header and
> footer.  What kind of files would these be?  Seperate?  Would they be <
> %def>s?  I don't need to worry about any database interaction yet - I
> just want to get the bare bones up and running before that jazz.  Oh,
> and I'm a java programmer, not a python programmer (ok, I'm just a mom
> now but once upon a time...)  I feel like they are similar animals
> from reading Learning Python or whatever book I have so I think I
> shouldn't have too much a problem.   Am I wrong?
>
> So, any takers?  Think of it as the groundwork for your new docs :D
>
> TIA!
>
>
> >
>


-- 
WBR, Dan Korostelev

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to