Commit 6561633d authored by Patrick Kimber's avatar Patrick Kimber

Update requirements (Django 1.11 etc)

parent 3e00434c
Pipeline #8871260 failed with stage
in 1 minute and 7 seconds
services:
- postgres:9.5
test:
script:
- export DATABASE_HOST=postgres
- export DATABASE_USER=postgres
- export MAILGUN_SERVER_NAME=test.net
- export STRIPE_PUBLISH_KEY="pk_test"
- export STRIPE_SECRET_KEY="sk_test"
- pip3 install -r requirements/ci.txt -i https://devpi.kbsoftware.co.uk/kb/dev/+simple/
- py.test --create-db --cov-report term --cov=booking
......@@ -29,7 +29,7 @@ Usage
::
../init_dev.sh
./init_dev.sh
Release
=======
......
......@@ -194,6 +194,10 @@ class BookingManager(models.Manager):
(Q(end_date__month=month) & Q(end_date__year=year))
)
def _four_months(self):
today = timezone.now().date()
return today + relativedelta(months=4)
def _two_months(self):
today = timezone.now().date()
return today + relativedelta(months=2)
......@@ -214,8 +218,11 @@ class BookingManager(models.Manager):
return self._filter_by_month(self._public(), month, year)
def _staff_calendar(self):
four_months = self._four_months()
# last day of this month
end_date = four_months + relativedelta(months=+1, day=1, days=-1)
return self._filter_by_date(
self._current(), timezone.now().date(), self._two_months()
self._current(), timezone.now().date(), end_date
)
def _staff_month(self, month, year):
......
......@@ -269,6 +269,7 @@ class PdfCalendar(MyReport):
html, tags=tags, attributes=attr, styles=styles, strip=True
)
result = result.replace('</p>', '<br />')
result = result.replace('<br>', '<br />')
result = result.replace('<p>', '')
return result
......
bleach==1.4.3
celery==3.1.23
django-braces==1.9.0
django-redis==4.4.3
django-reversion==2.0.6
bleach==2.0.0
celery==3.1.25
django-braces==1.11.0
django-redis==4.6.0
django-reversion==2.0.8
django-sendfile==0.3.11
Django==1.10.3
easy-thumbnails==2.3
pillow==3.3.1
python-dateutil==2.5.3
pytz==2016.6.1
Django==1.11.2
easy-thumbnails==2.4.1
pillow==4.1.1
python-dateutil==2.6.0
pytz==2017.2
redis==2.10.5
reportlab==3.3.0
reportlab==3.4.0
......@@ -3,6 +3,7 @@
-e ../base
-e ../login
-e ../mail
-e ../report
factory-boy
psycopg2
pytest-cov
......
[pytest]
addopts= --cov-report html --reuse-db
DJANGO_SETTINGS_MODULE = example_booking.dev_test
norecursedirs = .git venv-*
[tool:pytest]
addopts= --ds=example_booking.dev_test --cov-report html --reuse-db --fail-on-template-vars
norecursedirs = .git venv-* src
# 1. migrations always import models
# 2. custom settings files e.g. 'dev_patrick.py' do 'from .base import *'
# 3. 'test_view_perm.py' py.test fixtures conflict with pyflakes
flakes-ignore =
booking/migrations/* UnusedImport
example_booking/dev_*.py ImportStarUsed
project/migrations/* UnusedImport
settings/* ImportStarUsed
test_view_perm.py UnusedImport RedefinedWhileUnused
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment