# from django.db.models.signals import post_save, post_delete
# from django.dispatch import receiver
# from . import models
#
#
# @receiver(post_save, sender=models.CarReservation)
# def update_car_status_on_reservation(sender, instance, created, **kwargs):
#     if created:
#         car = instance.car
#         car.status = models.CarStatusChoices.RESERVED
#         car.save()
#
#
# @receiver(post_delete, sender=models.CarReservation)
# def update_car_status_on_reservation_delete(sender, instance, **kwargs):
#     car = instance.car
#     if not car.get_current_reservation():
#         car.status = models.CarStatusChoices.AVAILABLE
#         car.save()

