Question: their name, 5 5 2. You are given the task of building the appointment system of a hospital. Patients, without registration, can book an appointment

 their name, 5 5 2. You are given the task of

their name, 5 5 2. You are given the task of building the appointment system of a hospital. Patients, without registration, can book an appointment with a doctor by entering the preferred date, doctor's name, and phone number. For this, you have created a Django app called apptservice. *) Based on this scenario, create a model named Appointment. Write only the model class and their corresponding fields. * Create a form through which they can book an appointment by entering the data mentioned above. It should submit the data in url/bookappt via POST method. Write only the form code in your script. * Create a view function that will either render the html file containing the form (assume that the name of the template is bookappt.html) or receive the submitted data. If data is being submitted, save the data in model, and send an Http Response giving the serial number of that patient. Serial number of the patient = (# of previous patient of that doctor on that day) + 1. [Hint: You can use count() method to get the length of a QuerySet. Use multiple filters.] Only write the view function on the script. You cannot use class-based view. 15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!