FusionIIIT/applications/hostel_management/views.py
def staff_delete_schedule(request):
    """
    This function is responsible for deleting an existing staff schedule.
    @param:
      request - HttpRequest object containing metadata about the user request.

    @variables:
      staff_dlt_id - stores id of the staff whose schedule is to be deleted.
      staff - stores Staff object related to 'staff_name'
      staff_schedule - stores staff schedule related to 'staff'
    """
    if request.method == 'POST':
        staff_dlt_id=request.POST["dlt_schedule"]
        staff=Staff.objects.get(pk=staff_dlt_id)
        staff_schedule=StaffSchedule.objects.get(staff_id=staff)
        staff_schedule.delete()
    return HttpResponseRedirect(reverse("hostelmanagement:hostel_view"))

    This function is responsible for deleting an existing staff schedule.
    @param:
      request - HttpRequest object containing metadata about the user request.

    @variables:
      staff_dlt_id - stores id of the staff whose schedule is to be deleted.
      staff - stores Staff object related to 'staff_name'
      staff_schedule - stores staff schedule related to 'staff'
    
This function is responsible for deleting an existing staff schedule.
@param:
request - HttpRequest object containing metadata about the user request.

@variables:
staff_dlt_id - stores id of the staff whose schedule is to be deleted.
staff - stores Staff object related to 'staff_name'
staff_schedule - stores staff schedule related to 'staff'
This function is responsible for deleting an existing staff schedule . @param : request - HttpRequest object containing metadata about the user request . @variables : staff_dlt_id - stores id of the staff whose schedule is to be deleted . staff - stores Staff object related to ' staff_name ' staff_schedule - stores staff schedule related to ' staff '
def staff_delete_schedule(request):
    if request.method == 'POST':
        staff_dlt_id=request.POST["dlt_schedule"]
        staff=Staff.objects.get(pk=staff_dlt_id)
        staff_schedule=StaffSchedule.objects.get(staff_id=staff)
        staff_schedule.delete()
    return HttpResponseRedirect(reverse("hostelmanagement:hostel_view"))
def staff_delete_schedule ( request ) : if request . method == 'POST' : staff_dlt_id = request . POST [ "dlt_schedule" ] staff = Staff . objects . get ( pk = staff_dlt_id ) staff_schedule = StaffSchedule . objects . get ( staff_id = staff ) staff_schedule . delete ( ) return HttpResponseRedirect ( reverse ( "hostelmanagement:hostel_view" ) )
This function is responsible for deleting an existing staff schedule.
This function is responsible for deleting an existing staff schedule .
"""
    This function is responsible for deleting an existing staff schedule.
    @param:
      request - HttpRequest object containing metadata about the user request.

    @variables:
      staff_dlt_id - stores id of the staff whose schedule is to be deleted.
      staff - stores Staff object related to 'staff_name'
      staff_schedule - stores staff schedule related to 'staff'
    """
request