diff --git a/requirements.txt b/requirements.txt index 430b5f8755f21bbc65da2b720da97812fb6b0288..fb33ee6b7111cec03803cd7fc6c823d7613070b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,24 +1,60 @@ -pandas==0.23.4 -numpy==1.15.2 -matplotlib==2.2.3 +asn1crypto==0.24.0 +Babel==2.6.0 +backports.functools-lru-cache==1.5 +certifi==2018.8.24 +cffi==1.11.5 +chardet==3.0.4 +coverage==4.5.1 +cryptography==2.3.1 +cycler==0.10.0 Django==1.11.5 -gunicorn==19.6.0 -Pillow==3.4.2 -psycopg2==2.6.2 -pytz==2016.10 -lxml==3.7.3 -python-docx==0.8.6 django-cleanup==0.4.2 -django_cron==0.5.0 -django-two-factor-auth==1.6.1 -nexmo +django-common-helpers==0.9.2 +django-cron==0.5.0 django-excel==0.0.9 -pyexcel-xls==0.5.0 -pyexcel==0.5.3 -pycurl==7.43.0 +django-formtools==2.1 +django-otp==0.5.0 +django-phonenumber-field==1.3.0 django-stronghold==0.2.9 -timeout-decorator==0.4.0 -Unidecode==1.0.22 +django-two-factor-auth==1.6.1 +enum34==1.1.6 Faker==0.9.2 +funcsigs==1.0.2 +gunicorn==19.6.0 +idna==2.7 +ipaddress==1.0.22 +kiwisolver==1.0.1 +lml==0.0.1 +luhn==0.2.0 +lxml==3.7.3 +matplotlib==2.2.3 +mockito==1.1.1 +nexmo==2.3.0 +numpy==1.15.2 pandas==0.23.4 -numpy==1.15.2 \ No newline at end of file +phonenumberslite==8.9.14 +Pillow==3.4.2 +psycopg2==2.7.6.1 +pycparser==2.19 +pycurl==7.43.0.2 +pyexcel==0.5.3 +pyexcel-io==0.5.9.1 +pyexcel-webio==0.1.4 +pyexcel-xls==0.5.0 +PyJWT==1.6.4 +pyparsing==2.2.2 +python-dateutil==2.7.3 +python-docx==0.8.6 +pytz==2016.10 +qrcode==4.0.4 +requests==2.19.1 +six==1.11.0 +sqlparse==0.2.4 +subprocess32==3.5.2 +text-unidecode==1.2 +texttable==1.4.0 +timeout-decorator==0.4.0 +Unidecode==1.0.22 +urllib3==1.23 +xlrd==1.1.0 +xlwt==1.3.0 diff --git a/smash/web/management/commands/holidays.py b/smash/web/management/commands/holidays.py index 7c01d080eecf0b2718506b3c7a33eebc566cf3ba..ab0db550f47af4e947158e7593b406daa819fc6b 100644 --- a/smash/web/management/commands/holidays.py +++ b/smash/web/management/commands/holidays.py @@ -4,9 +4,6 @@ from django.core.management.base import BaseCommand from ...models import Appointment, Location, AppointmentType, AppointmentTypeLink -appointment_type_other = AppointmentType.objects.filter(code='OTHER').first() - - def get_easter_monday(easter_sunday): return next_weekday(easter_sunday, 0) @@ -64,6 +61,7 @@ class Command(BaseCommand): holiday.comment = comment holiday.visit_id = None holiday.save() + appointment_type_other = AppointmentType.objects.get_or_create(code='OTHER', defaults={default_duration: 60}) link = AppointmentTypeLink(appointment=holiday, appointment_type=appointment_type_other) link.save() @@ -92,4 +90,4 @@ def next_weekday(day_datetime, week_day): days_ahead = week_day - day_datetime.weekday() if days_ahead <= 0: days_ahead += 7 - return day_datetime + datetime.timedelta(days_ahead) + return day_datetime + datetime.timedelta(days_ahead) \ No newline at end of file