> 1. Should I great an app only for this purpose, in the sense, an app will
> host a header and footer functions (methods) along with their views. Is that
> the best practice?

You can use {% include "snippet.html" %} or a {% block name %}Default
template in your  base template that you extend{% endblock %}.  The
include will take a variable you can pass for the name of the snippet
and the block can easily be replaced by a block in your non base
templates.  No app needed just use the templating system, it's
actually desinged to handle these types of things.  You can also
generate different bases to extend if you want but find using blocks
and includes on one or two bases easier.  The bases I use are for
skins and popups. Use the admin site templates to get a understanding
of  {% extends base %} where base can be a template or variable naming
a template.

> 2. my second question, if I am going to host a header somewhere centered. Is
> it possible that I include or exclude certain css or js from the main
> header?

Again look at the block tags I have {% block css %} and {% block js %}
in my base templates and any default js/css.  Start by looking at the
base.html in the admin application to start understanding how to set
templates up based on what I consider best practices.

> 3. Is there a django module that help organizing my js and css in a way?

There are a few I don't use them but google will know.

> 4. last, what is django_compressor used for, I don't get the idea, If am
> going to specify the paths to my js. Why does it combine them all in a
> single file? does that make the loading faster?

I believe it combines js/css into a cache that is then made available
to the client to keep the number of requests down which is a issue on
some sites.  I suggest using YSlow to evaluate your site and a few
others to get an idea about performance and performance issues and see
if this may be something you need.  Most browsers only allow 7 threads
at a time to a site so if your site requires 60 connections to
generate a page you start blocking based on performance etc this is an
issues with some sites.

Mark

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to