Skip to content

Instantly share code, notes, and snippets.

View MrAhmedElsayed's full-sized avatar
🏠
Working from home

Ahmed El Sayed Abd el Bari MrAhmedElsayed

🏠
Working from home
View GitHub Profile
def clone_kpi(request):
context = dict()
if request.method == 'GET':
context['all_kpis'] = KpiModel.objects.values_list('name', flat=True).distinct()
return JsonResponse(context, )
if request.method == 'POST' and request.is_ajax():
if request.POST.get("operation") == "clone-kpi-operation":
all_selected_checkbox = request.POST.getlist("all_selected_checkbox[]") # NEW