diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000000000000000000000000000000000000..37e09c5d80234cbb5edacbab5bc92d550772a692 --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,41 @@ +# Development Guide + +## Setup + +* Install python3 and virtualenv +* Create a virtualenv and install the requirements + +``` +virtualenv -p python3 venv +source venv/bin/activate +pip install -r requirements.txt +``` + +* Create a database (with sqlite, postgres, …) +* Create a config file + +``` +cp config.py.example config.py +``` + +* Edit the config file to your needs + - Don't forget to enter your database connection + - And your authentication backend + - And deactivate everything you do not use + +* Fill your database + +``` +./server.py db upgrade +``` + +## Running the program + +``` +source venv/bin/activate +./server.py runserver +``` + +The website will run on `localhost:5000`. + + diff --git a/config.py.example b/config.py.example index 91efe386b12cd80c55c5968664fe93ebcbb376d4..181aed80df8292e0b7ca85efbeaed493548475d2 100644 --- a/config.py.example +++ b/config.py.example @@ -1,5 +1,7 @@ # (local) database SQLALCHEMY_DATABASE_URI = "postgresql://user:password@host/database" # change this +#SQLALCHEMY_DATABASE_URI = "mysql://user:password@host/database" +#SQLALCHEMY_DATABASE_URI = "sqlite:///path/to/database.db" SQLALCHEMY_TRACK_MODIFICATIONS = False # do not change SECRET_KEY = "something random" # change this