Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Tutorial

Tutorial

Back to Snip <-- Previous Change | Next Change -->

Diff Summary
Title
Date 2008-02-17 00:28:06 2008-02-17 00:46:19
Editor Herbert Poul Herbert Poul
Tags

2008-02-17 00:28:06 by Herbert Poul
2008-02-17 00:46:19 by Herbert Poul
117        'django.core.context_processors.request',117        'django.core.context_processors.request',
118        'django.core.context_processors.media',118        'django.core.context_processors.media',
119        'sphene.community.context_processors.navig119        'sphene.community.context_processors.navig
>ation',>ation',
120    )120    )
121121
nn122# Validating template loaders
123
124Make sure you have the application template loader
 > in your TEMPLATE_LOADERS setting ('django.templat
 >e.loaders.app_directories.load_template_source')
125
126for example:
127
128    TEMPLATE_LOADERS = (
129        'sphene.community.groupaware_templateloade
 >r.load_template_source',
130        'django.template.loaders.filesystem.load_t
 >emplate_source',
131        'django.template.loaders.app_directories.l
 >oad_template_source',
132    )
133
134
122# Adding Template Directories135# Adding Template Directories
123136
n124We need to add two template directories ..n137We need to add our template directories ..
125138
126- One for your site templates which are specific t139- One for your site templates which are specific t
>o our new cool project>o our new cool project
n127- The templates used for Sphene Community Tools n
128140
n129Therefore edit settings.py and after setting ROOT_n141Therefore edit settings.py and after setting ROOT_
>PATH = os.path.dirname(..) we created previously (>PATH = os.path.dirname(..) we created previously a
>as well as LIB_PATH) add the following:>dd the following:
130142
131    TEMPLATE_DIRS = (143    TEMPLATE_DIRS = (
132        os.path.join(ROOT_PATH,'sitetemplates'),144        os.path.join(ROOT_PATH,'sitetemplates'),
t133        os.path.join(LIB_PATH, 'templates'), t
134    )145    )
135146
136# Creating base template147# Creating base template
137148
138SCT expects to find a 'base.html' template with a 149SCT expects to find a 'base.html' template with a 
>'content' block, so we need to create a simple tem>'content' block, so we need to create a simple tem
>plate. Therefore.. create the directory 'sitetempl>plate. Therefore.. create the directory 'sitetempl
>ates' and a file called 'base.html' with (for exam>ates' and a file called 'base.html' with (for exam
>ple) the following content:>ple) the following content:


Powered by Sphene Community Tools