diff --git a/Makefile b/Makefile index 63002664..30de0dd7 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ test: install-dev ## Run the tests .PHONY: black black: install-dev ## Run the tests - $(VENV)/bin/black --target-version=py34 . + $(VENV)/bin/black --target-version=py36 . .PHONY: isort isort: install-dev ## Run the tests diff --git a/README.rst b/README.rst index 84d73b4a..9263e3fa 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,7 @@ encouraged to do so. Requirements ============ -* **Python**: 3.6, 3.7, 3.8. +* **Python**: version 3.6 to 3.9. * **Backends**: MySQL, PostgreSQL, SQLite, Memory. Contributing diff --git a/docs/installation.rst b/docs/installation.rst index b33fb55d..82ac12f2 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -19,7 +19,7 @@ Requirements «Ihatemoney» depends on: -* **Python**: either 3.6, 3.7 or 3.8 will work. +* **Python**: version 3.6 to 3.9 included will work. * **A Backend**: to choose among MySQL, PostgreSQL, SQLite or Memory. * **Virtual environment** (recommended): `python3-venv` package under Debian/Ubuntu. diff --git a/ihatemoney/migrations/env.py b/ihatemoney/migrations/env.py index 0bd0031e..1a443181 100755 --- a/ihatemoney/migrations/env.py +++ b/ihatemoney/migrations/env.py @@ -77,7 +77,7 @@ def run_migrations_online(): target_metadata=target_metadata, include_object=include_object, process_revision_directives=process_revision_directives, - **current_app.extensions["migrate"].configure_args + **current_app.extensions["migrate"].configure_args, ) try: diff --git a/ihatemoney/patch_sqlalchemy_continuum.py b/ihatemoney/patch_sqlalchemy_continuum.py index dbbd9083..eecfe6fa 100644 --- a/ihatemoney/patch_sqlalchemy_continuum.py +++ b/ihatemoney/patch_sqlalchemy_continuum.py @@ -96,7 +96,7 @@ class PatchedRelationShipBuilder(RelationshipBuilder): association_col == self.association_version_table.c[association_col.name] for association_col in association_cols - ] + ], ) ) .group_by(*association_cols) diff --git a/ihatemoney/run.py b/ihatemoney/run.py index 1d2a575f..4ce8aaaf 100644 --- a/ihatemoney/run.py +++ b/ihatemoney/run.py @@ -170,7 +170,7 @@ def create_app( number, currency if currency != CurrencyConverter.no_currency else "", *args, - **kwargs + **kwargs, ).strip() app.jinja_env.filters["currency"] = currency diff --git a/ihatemoney/static/css/download_mobile_app.css b/ihatemoney/static/css/download_mobile_app.css new file mode 100644 index 00000000..8fe87bb9 --- /dev/null +++ b/ihatemoney/static/css/download_mobile_app.css @@ -0,0 +1,13 @@ +.get-it-from { + width: 100px; + min-height: 110px; + border: 5px solid floralwhite; + background-color: white; margin: 10px; +} +.get-it-from:hover { + opacity: 80%; +} +main { + background: linear-gradient(150deg, #abe128 0%, #43ca61 100%); + font-family: 'Comfortaa', arial, serif; +} diff --git a/ihatemoney/static/images/app-store.svg b/ihatemoney/static/images/app-store.svg new file mode 100644 index 00000000..ac111e59 --- /dev/null +++ b/ihatemoney/static/images/app-store.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ihatemoney/static/images/f-droid.svg b/ihatemoney/static/images/f-droid.svg new file mode 100644 index 00000000..bac1d085 --- /dev/null +++ b/ihatemoney/static/images/f-droid.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ihatemoney/static/images/google-play.png b/ihatemoney/static/images/google-play.png new file mode 100644 index 00000000..a93fdeab Binary files /dev/null and b/ihatemoney/static/images/google-play.png differ diff --git a/ihatemoney/templates/download_mobile_app.html b/ihatemoney/templates/download_mobile_app.html new file mode 100644 index 00000000..b343c71f --- /dev/null +++ b/ihatemoney/templates/download_mobile_app.html @@ -0,0 +1,26 @@ +{% extends "layout.html" %} + +{% block css %} + +{% endblock %} + +{% block body %} +
+
+

{{_("Download Mobile Application")}}

+
+

{{_("Get it on")}}

+
+ + + + + + + + + + +
+
+{% endblock %} diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 3350d338..790f5ebe 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -7,6 +7,7 @@ + {% block css %}{% endblock %} @@ -145,14 +146,14 @@ {{ static_include("images/git.svg") | safe }} - + {{ static_include("images/mobile-alt.svg") | safe }} {{ static_include("images/book.svg") | safe }} {% if g.show_admin_dashboard_link %} - + {{ static_include("images/cog.svg") | safe }} {% endif %} diff --git a/ihatemoney/web.py b/ihatemoney/web.py index 442779f7..d16cf55e 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -270,6 +270,11 @@ def home(): ) +@main.route("/mobile") +def mobile(): + return render_template("download_mobile_app.html") + + @main.route("/create", methods=["GET", "POST"]) @requires_admin(bypass=("ALLOW_PUBLIC_PROJECT_CREATION", True)) def create_project(): diff --git a/setup.cfg b/setup.cfg index 43a33886..c56441bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Topic :: Internet :: WWW/HTTP Topic :: Internet :: WWW/HTTP :: WSGI :: Application diff --git a/tox.ini b/tox.ini index 372f60f9..6b967871 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py37,py36,docs,flake8,black +envlist = py39,py38,py37,py36,docs,flake8,black skip_missing_interpreters = True [testenv] @@ -22,7 +22,7 @@ changedir = {toxinidir} [testenv:black] commands = - black --check --target-version=py34 . + black --check --target-version=py36 . isort -c -rc . changedir = {toxinidir} @@ -42,3 +42,4 @@ python = 3.6: py36 3.7: py37 3.8: py38, docs, black, flake8 + 3.9: py39