Exemplo n.º 1
0
def phonecab_realtime(request):
    """Show current calls"""
    import time
    import datetime

    variables = Acl.get_permissions_for_user(request.user.id, request.user.is_staff)
    variables["actual_nightmode"] = Helper.get_nightmode()

    return render_to_response("realtime.html", RequestContext(request, variables))
Exemplo n.º 2
0
def phonecab_get_nightmode(request):
    """Recupera la modalita giorno notte"""
    return HttpResponse(
        status=200, content=('{ "nightmode" : %d }' % Helper.get_nightmode()), content_type="application/json"
    )