Storing values from checkboxes in database I'm getting values from 2 checkboxes and save those values to a database.

I don't like these if statements. How is it possible to simplify the code?

def edit_user(request, user_id):

user = User.objects.get(id=user_id)

if request.POST:

    if request.POST.get('is_staff'):
        user.is_staff = True
    else:
        user.is_staff = False

    if request.POST.get('is_active'):
        user.is_active = True
    else:
        user.is_active = False

    user.save()

    return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/'))
You can use the default parameter from the get method.
Reference

if request.POST:
        user.is_staff = request.POST.get('is_staff', False)
        user.is_active = request.POST.get('is_active', False)
        user.save()