layerindex-web/rrs/context_processors.py
Meh Mbeh Ida Delphine 2314fb2811 Add SPDX license headers to layerindex-web source files
Added SPDX identifiers to all .py files except those in migrations directory.

Fixes: [YOCTO #13527]

Signed-off-by: Meh Mbeh Ida Delphine <idadelm@gmail.com>
Signed-off-by: Paul Eggleton <bluelightning@bluelightning.org>
2021-04-21 08:22:51 +12:00

22 lines
542 B
Python

# rrs-web - custom context processor
#
# Copyright (C) 2014 Intel Corporation
#
# Licensed under the MIT license, see COPYING.MIT for details
#
# SPDX-License-Identifier: MIT
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
}