soc/templates/README.templates
author Todd Larsen <tlarsen@google.com>
Tue, 06 May 2008 19:25:37 +0000
changeset 3 962da9e1065d
child 34 14c266e01a56
permissions -rw-r--r--
Add a "namespace-subdivided" Django templates directory for the SoC framework.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     1
Templates are placed in a "namespace" subdirectory in the templates directory,
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     2
since the templates directory will be added to the Django templates search
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     3
path.  This allows other packages to extend existing templates without "hiding"
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     4
the original template.  For example, a template in another Melange application
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     5
can extend a template in the SoC framework like this:
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     6
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     7
  {% extends 'soc/some_existing_template.html %}
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     8
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
     9
without "hiding" the some_existing_template.html for other uses, even if the
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    10
derived template is also named some_existing_template.html.
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    11
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    12
So, please do not put any templates in this soc/templates directory, but only
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    13
place them in the soc/templates/soc "namespace" subdirectory.
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    14
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    15
Different Melange applications should also follow this pattern, to promote
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    16
sharing of templates between applications as well.  For exmample, the GSoC
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    17
Melange application should place its templates in gsoc/templates/gsoc.
962da9e1065d Add a "namespace-subdivided" Django templates directory for the SoC
Todd Larsen <tlarsen@google.com>
parents:
diff changeset
    18