mirror of
https://github.com/rjNemo/villafleurie
synced 2026-06-12 13:26:47 +00:00
bookingform debug; cleaning requirements
This commit is contained in:
parent
cb840433de
commit
5edc4fc675
5 changed files with 33 additions and 46 deletions
3
TODO.md
3
TODO.md
|
|
@ -22,7 +22,7 @@
|
||||||
- [ ] Réservation page : Ajouter des photos. Renvoyer vers la page Location onClick sur Réserver TX. Proposer Upsells : navette + location voiture.
|
- [ ] Réservation page : Ajouter des photos. Renvoyer vers la page Location onClick sur Réserver TX. Proposer Upsells : navette + location voiture.
|
||||||
- [x] Vider le contenu du folder root ?
|
- [x] Vider le contenu du folder root ?
|
||||||
- [x] Pages confirmation message contact envoyé,
|
- [x] Pages confirmation message contact envoyé,
|
||||||
- [ ] reservations réussies ou non (expliquer pourquoi)
|
- [x] reservations réussies ou non (expliquer pourquoi)
|
||||||
- [ ] SSL certificate
|
- [ ] SSL certificate
|
||||||
- [ ] [github](https://github.com/linuxserver/docker-letsencrypt)
|
- [ ] [github](https://github.com/linuxserver/docker-letsencrypt)
|
||||||
- [ ] [medium](https://medium.com/@gardenvariety/easy-https-with-letsencrypt-and-docker-compose-168df411e2d2)
|
- [ ] [medium](https://medium.com/@gardenvariety/easy-https-with-letsencrypt-and-docker-compose-168df411e2d2)
|
||||||
|
|
@ -36,3 +36,4 @@
|
||||||
- [ ] Calendar API: [docs](https://github.com/googleapis/google-api-python-client/blob/master/docs/start.md)
|
- [ ] Calendar API: [docs](https://github.com/googleapis/google-api-python-client/blob/master/docs/start.md)
|
||||||
- [ ] Blog
|
- [ ] Blog
|
||||||
- [x] Call update_calendar from BookingManager. SOlve circular dependencies
|
- [x] Call update_calendar from BookingManager. SOlve circular dependencies
|
||||||
|
- [ ] Trigger booking price Update when booking modified (calendar.py l:100)
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ def synchronize(place):
|
||||||
|
|
||||||
start = reservation['start']
|
start = reservation['start']
|
||||||
end = reservation['end']
|
end = reservation['end']
|
||||||
price = reservation['price']
|
|
||||||
|
|
||||||
guest = Guest.objects.filter(name=reservation['guest'])
|
guest = Guest.objects.filter(name=reservation['guest'])
|
||||||
if not guest.exists():
|
if not guest.exists():
|
||||||
|
|
@ -104,10 +103,10 @@ def synchronize(place):
|
||||||
db_booking.guest = guest,
|
db_booking.guest = guest,
|
||||||
db_booking.start = start,
|
db_booking.start = start,
|
||||||
db_booking.end = end
|
db_booking.end = end
|
||||||
db_booking.price = price
|
# db_booking.price = price
|
||||||
|
|
||||||
|
|
||||||
def get_bookings(place):
|
def get_bookings_from_db(place):
|
||||||
""" Synchronize with Master calendar via a call to synchronize_calendar
|
""" Synchronize with Master calendar via a call to synchronize_calendar
|
||||||
Returns a list of all related place reservations """
|
Returns a list of all related place reservations """
|
||||||
|
|
||||||
|
|
@ -120,7 +119,7 @@ def get_bookings(place):
|
||||||
def check_availability(place, start_date, end_date):
|
def check_availability(place, start_date, end_date):
|
||||||
""" check if the related place is available during a given period """
|
""" check if the related place is available during a given period """
|
||||||
|
|
||||||
bookings = get_bookings(place)
|
bookings = get_bookings_from_db(place)
|
||||||
for booking in bookings:
|
for booking in bookings:
|
||||||
if (booking.start <= start_date <= booking.end) or (booking.start <= end_date <= booking.end):
|
if (booking.start <= start_date <= booking.end) or (booking.start <= end_date <= booking.end):
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import IntegrityError
|
from django.db import IntegrityError
|
||||||
from django.shortcuts import render, get_object_or_404
|
from django.shortcuts import render, get_object_or_404
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
from rental.forms.booking import BookingForm
|
from rental.forms.booking import BookingForm
|
||||||
from rental.models.booking import Booking
|
from rental.models.booking import Booking
|
||||||
from rental.models.guest import Guest
|
from rental.models.guest import Guest
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from rental.forms.contact import ContactForm
|
from rental.forms.contact import ContactForm
|
||||||
|
from rental.models.contact import Contact
|
||||||
|
|
||||||
|
|
||||||
def view(request):
|
def view(request):
|
||||||
|
|
|
||||||
|
|
@ -1,54 +1,39 @@
|
||||||
amqp==2.5.2
|
amqp==2.5.2
|
||||||
asgiref==3.2.3
|
asgiref==3.2.7
|
||||||
astroid==2.3.3
|
beautifulsoup4==4.9.0
|
||||||
beautifulsoup4==4.8.1
|
billiard==3.6.3.0
|
||||||
billiard==3.6.1.0
|
cachetools==4.0.0
|
||||||
bs4==0.0.1
|
celery==4.4.2
|
||||||
cachetools==3.1.1
|
certifi==2020.4.5.1
|
||||||
celery==4.4.0
|
|
||||||
certifi==2019.11.28
|
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
dj-database-url==0.5.0
|
Django==3.0.5
|
||||||
Django==3.0.4
|
|
||||||
get==2019.4.13
|
|
||||||
google==2.0.3
|
google==2.0.3
|
||||||
google-api-python-client==1.7.11
|
google-api-core==1.16.0
|
||||||
google-auth==1.7.2
|
google-api-python-client==1.8.0
|
||||||
|
google-auth==1.13.1
|
||||||
google-auth-httplib2==0.0.3
|
google-auth-httplib2==0.0.3
|
||||||
google-auth-oauthlib==0.4.1
|
google-auth-oauthlib==0.4.1
|
||||||
|
googleapis-common-protos==1.51.0
|
||||||
gunicorn==20.0.4
|
gunicorn==20.0.4
|
||||||
httplib2==0.14.0
|
httplib2==0.17.1
|
||||||
idna==2.8
|
idna==2.9
|
||||||
importlib-metadata==1.2.0
|
importlib-metadata==1.6.0
|
||||||
isort==4.3.21
|
kombu==4.6.8
|
||||||
kombu==4.6.7
|
|
||||||
lazy-object-proxy==1.4.3
|
|
||||||
lxml==4.5.0
|
|
||||||
mccabe==0.6.1
|
|
||||||
more-itertools==8.0.2
|
|
||||||
oauth2client==4.1.3
|
|
||||||
oauthlib==3.1.0
|
oauthlib==3.1.0
|
||||||
path==13.1.0
|
Pillow==7.1.1
|
||||||
Pillow==7.1.0
|
protobuf==3.11.3
|
||||||
post==2019.4.13
|
psycopg2==2.8.5
|
||||||
psycopg2==2.8.4
|
|
||||||
public==2019.4.13
|
|
||||||
pyasn1==0.4.8
|
pyasn1==0.4.8
|
||||||
pyasn1-modules==0.2.7
|
pyasn1-modules==0.2.8
|
||||||
pycodestyle==2.5.0
|
|
||||||
pytz==2019.3
|
pytz==2019.3
|
||||||
query-string==2019.4.13
|
requests==2.23.0
|
||||||
request==2019.4.13
|
|
||||||
requests==2.22.0
|
|
||||||
requests-oauthlib==1.3.0
|
requests-oauthlib==1.3.0
|
||||||
rsa==4.0
|
rsa==4.0
|
||||||
six==1.13.0
|
six==1.14.0
|
||||||
soupsieve==1.9.5
|
soupsieve==2.0
|
||||||
sqlparse==0.3.0
|
sqlparse==0.3.1
|
||||||
typed-ast==1.4.0
|
uritemplate==3.0.1
|
||||||
uritemplate==3.0.0
|
urllib3==1.25.8
|
||||||
urllib3==1.25.7
|
|
||||||
vine==1.3.0
|
vine==1.3.0
|
||||||
whitenoise==4.1.4
|
whitenoise==5.0.1
|
||||||
wrapt==1.11.2
|
|
||||||
zipp==3.1.0
|
zipp==3.1.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue