| 'sphene.community.middleware.GroupMiddlewa | | 'sphene.community.middleware.GroupMiddlewa |
| re', | | re', |
| | | |
| To add the template context processor you need to | | To add the template context processor you need to |
| modify TEMPLATE_CONTEXT_PROCESSOR - this variable | | modify TEMPLATE_CONTEXT_PROCESSOR - this variable |
| is by default not set in the generated settings.py | | is by default not set in the generated settings.py |
| - so if you don't have it yet in your settings.py | | - so if you don't have it yet in your settings.py |
| you have to add it: | | you have to add it: |
| | | |
| | | |
n | | n | # import the default values from django settin |
| | | gs
|
| | | from django.conf.global_settings import TEMPLA |
| | | TE_CONTEXT_PROCESSORS
|
| | |
|
| TEMPLATE_CONTEXT_PROCESSORS = ( | | TEMPLATE_CONTEXT_PROCESSORS += ( |
| "django.contrib.auth.context_processors.au | | # add navigation middleware for SCT
|
| th",
| | |
| "django.core.context_processors.debug",
| | |
| "django.core.context_processors.i18n",
| | |
| "django.core.context_processors.media",
| | |
| "django.core.context_processors.static",
| | |
| "django.contrib.messages.context_processor | | |
| s.messages",
| | |
| 'sphene.community.context_processors.navig | | 'sphene.community.context_processors.navig |
| ation', | | ation', |
| ) | | ) |
n | | n |
|
| | | |
| ## Synchronizing tables | | ## Synchronizing tables |
| | | |
| After adding the community projects, run syncdb ag | | After adding the community projects, run syncdb ag |
| ain which will create all necessary tables. | | ain which will create all necessary tables. |
| | | |
| ./manage.py syncb | | ./manage.py syncb |
t | | t |
|
| | | If you have also added south to your INSTALLED_APP |
| | | S also use
|
| | |
|
| | | ./manage.py migrate
|
| | | |
| ## Create base template | | ## Create base template |
| | | |
| SCT requires a template called base.html which has | | SCT requires a template called base.html which has |
| at least a block called "content" and one called | | at least a block called "content" and one called |
| "head". To make this easier we will create a small | | "head". To make this easier we will create a small |
| community app which hosts only your template. If | | community app which hosts only your template. If |
| you are integrating SCT into your own project, yo | | you are integrating SCT into your own project, yo |
| u probably already have a base template. | | u probably already have a base template. |
| | | |