| 'django.core.context_processors.request', | | 'django.core.context_processors.request', |
| 'django.core.context_processors.media', | | 'django.core.context_processors.media', |
| 'sphene.community.context_processors.navig | | 'sphene.community.context_processors.navig |
| ation', | | ation', |
| ) | | ) |
| | | |
n | | n | # Validating template loaders
|
| | |
|
| | | Make sure you have the application template loader |
| | | in your TEMPLATE_LOADERS setting ('django.templat |
| | | e.loaders.app_directories.load_template_source')
|
| | |
|
| | | for example:
|
| | |
|
| | | TEMPLATE_LOADERS = (
|
| | | 'sphene.community.groupaware_templateloade |
| | | r.load_template_source',
|
| | | 'django.template.loaders.filesystem.load_t |
| | | emplate_source',
|
| | | 'django.template.loaders.app_directories.l |
| | | oad_template_source',
|
| | | )
|
| | |
|
| | |
|
| # Adding Template Directories | | # Adding Template Directories |
| | | |
n | We need to add two template directories .. | n | We need to add our template directories .. |
| | | |
| - One for your site templates which are specific t | | - One for your site templates which are specific t |
| o our new cool project | | o our new cool project |
n | - The templates used for Sphene Community Tools
| n | |
| | | |
n | Therefore edit settings.py and after setting ROOT_ | n | Therefore 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: |
| | | |
| TEMPLATE_DIRS = ( | | TEMPLATE_DIRS = ( |
| os.path.join(ROOT_PATH,'sitetemplates'), | | os.path.join(ROOT_PATH,'sitetemplates'), |
t | os.path.join(LIB_PATH, 'templates'),
| t | |
| ) | | ) |
| | | |
| # Creating base template | | # Creating base template |
| | | |
| SCT expects to find a 'base.html' template with a | | SCT 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: |