Sunil Mohan Adapa 58d13e3ed8 Use Django dispatcher instead of CherryPy dispatcher
This commit is big because anything small breaks the code.

- Django dispatcher is based on regular expressions and does not need a tree structure
- Reduces a lot of unnecessary dependencies among modules
- Use Django sessions middlewear instead of CherryPy sessions
- Introduce dependency based modules instead of numeric load order
- Remove PagePlugin and simply use Django views
- Eliminate page rendering wrappers in favor of Django context processors
- Use custom auth for now until replaced by Django auth middlewear
- Use Django templated 404 and 500 error pages
2014-06-12 23:33:25 +05:30

16 lines
388 B
Python

from gettext import gettext as _
from django.template.response import TemplateResponse
import cfg
def init():
"""Initialize the system module"""
cfg.main_menu.add_item(_('System'), 'icon-cog', '/sys', 100)
def index(request):
"""Serve the index page"""
return TemplateResponse(request, 'system.html',
{'title': _('System Configuration')})