@require_superuser
def approve_app(request, domain):
    domain = Domain.get(domain)
    if (request.GET.get('approve') == 'true'):
        domain.is_approved = True
        domain.save()
    elif (request.GET.get('approve') == 'false'):
        domain.is_approved = False
        domain.save()
    return HttpResponseRedirect((request.META.get('HTTP_REFERER') or reverse('appstore')))
@require_superuser
def approve_app(request, domain):
    domain = Domain.get(domain)
    if (request.GET.get('approve') == 'true'):
        domain.is_approved = True
        domain.save()
    elif (request.GET.get('approve') == 'false'):
        domain.is_approved = False
        domain.save()
    return HttpResponseRedirect((request.META.get('HTTP_REFERER') or reverse('appstore')))