np
Size: a a a
np
NC
BK
def get_hall(request):
if request.is_ajax and request.method == 'GET':
hall = Hall.objects.get().first()
hall_name = request.GET.get(hall.name)
return JsonResponse({"hall": hall_name})
apps.restaurant.models.Hall.MultipleObjectsReturned: get() returned more than one Hall -- it returned 3!
NC
np
np
NC
def get_hall(request):
if request.is_ajax and request.method == 'GET':
hall = Hall.objects.get().first()
hall_name = request.GET.get(hall.name)
return JsonResponse({"hall": hall_name})
apps.restaurant.models.Hall.MultipleObjectsReturned: get() returned more than one Hall -- it returned 3!
BK
NC
BK
<script>
$("#hall").click(function (e) {
e.preventDefault();
let serializedData = $(this).serialize();
$.ajax({
type: 'GET',
url: "{% url 'get_hall' %}",
data: serializedData,
success: function (response) {
console.log('hello', response)
}
})
})
</script>
DT
<script>
$("#hall").click(function (e) {
e.preventDefault();
let serializedData = $(this).serialize();
$.ajax({
type: 'GET',
url: "{% url 'get_hall' %}",
data: serializedData,
success: function (response) {
console.log('hello', response)
}
})
})
</script>
BK
AD
AD
DT
JF
PA
PA
KV
NL