Working Booking

As Raman started working on User Authentication, I decided to work on the Bookings. In home/ I created a BookingForm class which was linked to the ‘Booking’ model using model = Booking

As you can see in the commit:

In the class meta: , there are fields specified which will be shown on the html for the input. This input will then be stored in the database. So we call this form in the book.html page using {{ form.as_p }} and then in the, I called the template book.html which contains the form (BookingForm). There is a validation applied that if form is valid only then save it to the database else show the errors.


1 thought on “Working Booking

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close