howiworkdaily / django-site_info

Adds site_name, site_url, site_domain to the active context.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple context processor that adds SITE_NAME, SITE_URL, SITE_DOMAIN to the active request context.

Instructions
------------

1) Add SITE_NAME, SITE_URL, SITE_DOMAIN variables to your settings file.

Example:

SITE_URL = 'something here'
SITE_DOMAIN = 'something here'
SITE_NAME = 'something here'

2) Add the site_info project to your PYTHONPATH

3) Add the processor to your settings file's TEMPLATE_CONTEXT_PROCESSORS

Example:

TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'site_info.context.processors.site_info',
)

About

Adds site_name, site_url, site_domain to the active context.


Languages

Language:Python 100.0%