Relative Content

Tag Archive for pythondjangomodel

Get field value from Django model

I have a rental apartment booking page and the user has to state their arrival and departure dates in a booking form. I am trying to set up a date validator function that doesn’t allow the picked departure date to be before the arrival date. For this I need to get the value of the entered arrival_date field to use in the departure_before_arrival( ) function. Could anybody help out?