mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 21:24:46 +02:00

Add models for store Milestone, Maintainer and Recipe{Maintainer, Upgrade, Upstream, Distro}, add initial data for Milestone and Maintainer, initial migration and admin sites. Add rrs/context_processors.py for return the site_name and application for use in templates. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
20 lines
509 B
Python
20 lines
509 B
Python
# rrs-web - custom context processor
|
|
#
|
|
# Copyright (C) 2014 Intel Corporation
|
|
#
|
|
# Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
import settings
|
|
from django.contrib.sites.models import Site
|
|
|
|
def rrs_context(request):
|
|
site = Site.objects.get_current()
|
|
if site and site.name and site.name != 'example.com':
|
|
site_name = site.name
|
|
else:
|
|
site_name = 'Recipe reporting system'
|
|
return {
|
|
'site_name': site_name,
|
|
'application' : settings.APPLICATION
|
|
}
|