i'm working on site for renting rooms. User picks 2 dates(UserStartDate & UserEndDate).
with this python code i gonna get number of days in his date range:
user_date_range = [endUser - timedelta(i) for i in range((endUser - startUser).days+1)]
user_range_num_days = len(user_date_range)
and i have a day price for room: 20$
but due to lack of proficiency in Django,I can't figure out how to calculate user price according to his date range. And where it should be done.
hope for your help.