There are no particular layouts, but sometimes writing an inclusion tag[1]
can help with abstracting some of the logic from the template (especially in
the case of side columns that can vary based on context).

What I usually do:

Write a base.html file with some "default" data, including dummy content
text wrapped around something like a context block, eg.

<!-- In base.html -->
{% block content %}
  <p>No content yet.</p>
{% endblock %}

<!-- In some_template.html -->
{% extends 'base.html' %}

{% block content %}
  <p>My content</p>
{% endbock %}


I also have blocks for javascript, styles and extrahead, which usually are
called with {{ block.super }} in a specific template, so that I can append
more scripts to a section of the site rather than having to rewrite the
entire block.

Let us know if you need more help!


Cheers,
AT

[1]
https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#howto-custom-template-tags-inclusion-tags


On Tue, Aug 16, 2011 at 2:46 PM, Andre Lopes <lopes80an...@gmail.com> wrote:

> Hi, another question from a Django beginner.
>
> I have played with views and templates a little bit, but now I want to
> make a real layout(Header, Side Column and Footer). There are any
> guides on layouts that I should follow? There are Apps that will help
> me with that task?
>
> Please le me know.
>
> Best Regards,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to