def directoryservice_idmap_ldap(request, id): idmap_ldap = models.idmap_ldap.objects.get(id=id) if request.method == "POST": form = forms.idmap_ldap_Form(request.POST, instance=idmap_ldap) if form.is_valid(): form.save() return JsonResp(request, message="Idmap ldap successfully edited.") else: return JsonResp(request, form=form) else: form = forms.idmap_ldap_Form(instance=idmap_ldap) return render(request, 'directoryservice/idmap_ldap.html', {'form': form})
def directoryservice_idmap_ldap(request, id): idmap_ldap = models.idmap_ldap.objects.get(id=id) if request.method == "POST": form = forms.idmap_ldap_Form(request.POST, instance=idmap_ldap) if form.is_valid(): form.save() return JsonResp( request, message="Idmap ldap successfully edited." ) else: return JsonResp(request, form=form) else: form = forms.idmap_ldap_Form(instance=idmap_ldap) return render(request, 'directoryservice/idmap_ldap.html', { 'form': form })