Is there a way to prompt the user for a value without refreshing the page from in Django?

I'm currently attempting to modify a page that essentially keeps track of when a user enters/leaves an area. Currently all the logic works fine, but I would like to add the functionality to ask a user to enter their own estimate of the time they entered/left in the case they forgot to do so, since these instances get flagged upon submission.

What I'm having trouble with, is actually getting the "popup" to display. I'm not sure how to accomplish this from the, where I added the comment. I guess I need a way to just render that extra html on top of the page, without refreshing, until after they submit the edited_timestamp. I'm fairly new to Django/Python, and I have a very basic understanding of how this all works, so I apologize in advance if my suggestions on handling this are a bit off.

These is a summarized version of what the models look like:

class EmployeeWorkAreaLog(TimeStampedModel, SoftDeleteModel, models.Model):
    employee_number = models.ForeignKey(Salesman, on_delete=models.SET_NULL, help_text="Employee #", null=True, blank=False)
    work_area = models.ForeignKey(WorkArea, on_delete=models.SET_NULL, null=True, blank=False, help_text="Work Area", related_name="work_area")
    station_number = models.ForeignKey(StationNumber, on_delete=models.SET_NULL, null=True, help_text="Station", related_name="stations", blank=True)
    edited_timestamp = models.DateTimeField(null=True, blank=True)
    time_exceptions = models.CharField(max_length=2, blank=True)
    time_in = models.DateTimeField(help_text="Time in", null=True, blank=True)
    time_out = models.DateTimeField(blank=True, help_text="Time out", null=True)

    def __str__(self):
        return self.employee_number

I figured that the easiest way to do this is by adding it to the logic in, to prevent updating a wrong record, in such a way that, right after an entry gets flagged, the user is prompted to enter the date/time they estimate they entered an area.

To keep code readable, I'm only showing the case where entries get flagged. If someone tries to enter any area, the forgets to exit, and then attempts to enter an area again, the record without an exit gets immediately flagged (the time_exceptions='N' is the flag).

class EnterExitArea(CreateView):
    model = EmployeeWorkAreaLog
    template_name = "operations/enter_exit_area.html"
    form_class = WarehouseForm

    def form_valid(self, form):
        emp_num = form.cleaned_data['employee_number']
        area = form.cleaned_data['work_area']
        station = form.cleaned_data['station_number']

        if 'enter_area' in self.request.POST:
            EmployeeWorkAreaLog.objects.filter((Q(employee_number=emp_num) & Q(work_area=area) & Q(time_out__isnull=True) & Q(time_in__isnull=True)) & (Q(station_number=station) | Q(station_number__isnull=True))).update(

            # If employee has an entry without an exit and attempts to enter a new area, mark as an exception 'N'
            if EmployeeWorkAreaLog.objects.filter(Q(employee_number=emp_num) & Q(time_out__isnull=True) & Q(time_exceptions="")).count() > 1:
                first = EmployeeWorkAreaLog.objects.filter(employee_number=emp_num, time_out__isnull=True).order_by('-time_in').first()
                EmployeeWorkAreaLog.objects.filter((Q(employee_number=emp_num) & Q(time_out__isnull=True))).exclude('N')

            # Here would be the rendering of the page, maybe as a popup? and then saving the entered field using edited = form.cleaned_data['edited_timestamp'] and then saving it using .update()

            return HttpResponseRedirect(self.request.path_info)

I was trying to do this in a way that instead of redirecting to the same page, it would render something similar to the page below, which just requests for the time, and after the user submits, it saves it into the records' edited_timestamp field.


    <form id="warehouseForm" action="" method="POST" class="form-horizontal">
        <label>Enter estimated time:</label>
        <input value="html()" type="datetime-local" name="edited_timestamp">

Adding my main html page where this all takes place just in case. When the person hits the "Enter" button, it's when the logic in views starts.


{% extends "operations/base.html" %}

{% block main %}
    <form id="warehouseForm" action="" method="POST" class="form-horizontal" novalidate >
        {% csrf_token %}

                <div style="color: red">{{ form.employee_number.errors.as_text }}</div>
                {{ form.employee_number }}

                <div style="color: red">{{ form.work_area.errors.as_text }}</div>
                <label>Work Area</label>
                {{ form.work_area }}
            <div style="color: red">{{ form.station_number.errors.as_text }}</div>
                {{ form.station_number }}

                <button type="submit" name="enter_area" value="Enter">Enter Area</button>
                <button type="submit" name="leave_area" value="Leave">Leave Area</button>
{% endblock main %}