# Roadmap - [x] Prototype - [x] Milestone [1.0 Happy Birthday](https://willipink.eu/git/moritz/coinmanager/milestone/23) - [ ] Milestone [2.0 Nice to have](https://willipink.eu/git/moritz/coinmanager/milestone/24) - [ ] Add statistics [#5](https://willipink.eu/git/moritz/coinmanager/issues/5) - [ ] Add search function [#8](https://willipink.eu/git/moritz/coinmanager/issues/8) - [ ] Add undo/redo function [#12](https://willipink.eu/git/moritz/coinmanager/issues/12) - [ ] Add coin recognition AI - [ ] Fix century datetime bug before the end of 2098 # Licenses Coinc uses (besides python, javascript, HTML, CSS and more) the following open source software/data: - [Django](https://www.djangoproject.com) web framework, License: [three-clause BSD](https://github.com/django/django/blob/master/LICENSE) - [jQuery](https://jquery.org/) JS helper, License: [MIT License](https://github.com/jquery/jquery/blob/master/LICENSE.txt) - [jQuery-ui](https://jqueryui.com/) JS widgets, License: [Mixed](https://github.com/jquery/jquery-ui/blob/master/LICENSE.txt) - [Bootstrap](https://getbootstrap.com/) CSS backend, License: [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE) - [Bootswatch](https://bootswatch.com/default/) CSS theme, License: [MIT License](https://github.com/thomaspark/bootswatch/blob/master/LICENSE) - [Flagpedia](https://flagpedia.net) flag symbols, License: public domain # Deploying Add the following settings to your django app: ``` ./coinmanager/coinmanager/settings.py ALLOWED_HOSTS = [''] DEBUG = False STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static/') SECURE_SSL_REDIRECT = True SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True ``` Then collect all static files in /static: `python manage.py collectstatic` ## Apache2 - Install `mod_wsgi`: ` sudo apt install -y libapache2-mod-wsgi-py3 ` - Enable it `a2enmod wsgi` - Own the project folder with your webserver group `sudo chown -R :www-data /path/to/coinmanager` - Add this outside of your apache2 VirtualHost config: ``` /etc/apache2/apache2.conf # create wsgi daemon process named *coinc* WSGIDaemonProcess coinc python-home=/path/to/venv python-path=/path/to/coinmanager/coinmanager # create wsgi process group *coinc* WSGIProcessGroup coinc # coinmanager app WSGIScriptAlias /coinc /path/to/coinmanager/coinmanager/wsgi.py ``` - And a site specifig config: ``` /etc/apache2/sites-enabled/coinmanager.conf # create alias WSGIScriptAlias /coinc /path/to/coinmanager/coinmanager/wsgi.py # route /static to the project folder TODO: this is not optimal Alias /static /path/to/coinmanager/static # apache does (not yet) serve the correct Content-Type header for .mjs files ForceType text/javascript # downgrade Referrer-Policy header to make xhr-requests work Header always set Referrer-Policy "no-referrer-when-downgrade" # grant access to static files Require all granted # grant access to wsgi connector Require all granted ``` - Test if your config syntax ist OK `apachectl configtest` - Finally restart apache2 `systemctl restart apache2` # clear django cache When things arent changing this may help you: ``` python manage.py shell >>> from django.core.cache import cache; cache.clear(); exit() ``` # run tests ``` python manage.py test ```