from django.http import HttpResponse, Http404, FileResponse
from admin_interface.templatetags.admin_interface_tags import get_admin_interface_theme


def get_inter_Dict(user):

    Dict = {}

    from ServicesApp.funcs import get_sections
    sections = get_sections()
    theme = get_admin_interface_theme()
    Dict.update({
        'sections': sections,
        'logo': theme.logo.url
    })
    # from SubscribesApp.funcs import get_cur_user_subscribe
    # user_subscribe = get_cur_user_subscribe(user)

    # Dict.update({'user_subscribe': user_subscribe})

    return Dict

def get_inter_http_respose(template_obj, context_Dict, request):

    context_Dict.update(get_inter_Dict(request.user))

    return HttpResponse(template_obj.render(context_Dict, request))