Example #1
0
def status(request):
    "Set status variables"
    from baruwa.utils.misc import get_sys_status
    
    status = {'baruwa_status':'', 'baruwa_mail_total':'', 
            'baruwa_spam_total':'', 'baruwa_virus_total':''}
    
    if not hasattr(request, 'user'):
        return status
    
    if not request.user.is_authenticated():
        return status
        
    if request.is_ajax():
        return status
    
    return get_sys_status(request)
Example #2
0
def status(request):
    "Set status variables"

    status = {'baruwa_status': '', 'baruwa_mail_total': '',
            'baruwa_spam_total': '', 'baruwa_virus_total': ''}

    if not hasattr(request, 'user'):
        return status

    if not request.user.is_authenticated():
        return status

    if request.is_ajax() and not request.path.startswith('/mail/messages/'):
        return status

    status = get_sys_status(request)

    return status
Example #3
0
def status(request):
    "Set status variables"
    from baruwa.utils.misc import get_sys_status

    status = {'baruwa_status': '', 'baruwa_mail_total': '',
            'baruwa_spam_total': '', 'baruwa_virus_total': ''}

    if not hasattr(request, 'user'):
        return status

    if not request.user.is_authenticated():
        return status

    if request.is_ajax() and not request.path.startswith('/messages/'):
        return status

    status = get_sys_status(request)

    return status