def authinfo_add(request):
    if request.method == 'POST':
        form = AuthInfoForm(request.POST)
        if form.is_valid():
            form.save()
            return HttpResponseRedirect(reverse('authinfo_list'))
    else:
        form = AuthInfoForm()

    results = {
        'form': form,
        'request': request,
        'page_type': "whole"
    }
    return render(request, 'appconf/authinfo_add_edit.html', results)