A simple Web UI for managing financial data from various sources with Sane Finances library.
For using this project you must have Python 3.9 (at least) installed on your system.
All following instructions assume that you have Windows OS and py
Python starter installed.
You can modify provided scripts for using on any other OS or create your own with similar functionality.
-
Clone this repository or download ZIP file from GitHub to your local folder.
-
Move to
scripts
folder and startcreate_venv.bat
script. It will createvenv
directory for Python virtual environment.Provided script calls Python 3.9 interpreter but you can modify it for using any other supported Python version.
-
Start
prepare_venv.bat
script. It will download and install intovenv
all required packages and libraries.Before continue you maybe need to fix some security issues.
-
Start
intialize_db.bat
script. It will initialize database due toDATABASES
settings from\src\sane_fin_site\sane_fin_site\settings.py
module. All required tables andadmin
account will be created in the database.Default database provider is SQLite.
-
Start
prepare_static.bat
script. It will prepare required static files for using via HTTP (see How to manage static files for details).You may choose another way to manage static files (e.g. via
Nginx
orApache
) as described in How to deploy static files. In such case you have to switch off built-in "static handler" and set value of theSERVE_STATIC
setting (from\src\sane_fin_site\sane_fin_site\settings.py
module) toFalse
. -
Now you can start
runserver.bat
to run Django server, openlocalhost:8000
in your browser and work withSane Finances Site
.You can modify
runserver.bat
to start server on any other available port apart from8000
.
The server and the site will be available until you press CTRL+BREAK
in the console window
created by runserver.bat
script (or just close that window).
All changes, exporters, downloaded data, etc. will be saved into database
and will be resumed after you start runserver.bat
again.
This project supposed to be used as simple (even primitive) Web UI for Sane Finances library working on the local host (user machine). It is not supposed to be used as HTTP server visible to the outer "wild" Internet.
But you can increase security level of the server if you want (see Django Deployment checklist for details).
All following hints are not required if you will continue to use server for your own purposes on your local machine
Ensure that value of DEBUG
setting in the \src\sane_fin_site\sane_fin_site\settings.py
module is False
.
Start generate_new_secret_key.bat
script
and copy it's output into SECRET_KEY
setting value in the \src\sane_fin_site\sane_fin_site\settings.py
module.
Change the value of TIME_ZONE
setting in the \src\sane_fin_site\sane_fin_site\settings.py
module
to your current location.
While database initialization admin
account created with default password and e-mail
(see intialize_db.bat
script).
So, right after first start of the server you have to go to Admin page
and change admin
settings (e-mail and password).
You can make your project "bundled" (i.e. packed into single file with all dependencies) and almost portable via PyInstaller.
Just start run_pyinstaller.bat
script.
After script completed (ignore all Could not find GDAL library
errors)
you can find new folder \dist\sane_fin_site
with all files needed for working as standalone application
without Python installed.
You can pack this folder into ZIP file and move to another machine with same OS.
Such bundled application will work only on the same OS as it was created. See PyInstaller for details.