from django.conf import settings

from .models import SiteSetting


def get_site_settings_and_add_to_request(request):
    settings_id = getattr(settings, 'SITE_SETTINGS_ID', None)
    try:
        site_settings = SiteSetting.objects.get(id=settings_id)
    except SiteSetting.DoesNotExist:
        site_settings = None
    request.site_settings = site_settings
    return site_settings
@@ -367,20 +367,116 @@
 return site_settings
+%0A%0A%0Adef get_site_settings_uncached(site_id=None):%0A    return SiteSetting.objects.get(pk=site_id)%0A

Add get_site_settings_uncached function