Binder Gallery for GESIS Notebooks
-
Clone the repository and get into it
git clone https://github.com/gesiscss/binder_gallery.git cd binder_gallery -
Create and activate a virtual environment with python version at least 3.7.
-
Install dependencies:
pip install -r dev_requirements.txt -
Set required environment variables
export FLASK_APP=binder_gallery export FLASK_ENV=development # for windows set FLASK_APP=binder_gallery set FLASK_ENV=development -
Create a local sqlite3 db and apply migrations
python manage.py db upgrade -
Run the application
flask run
-
With
create-usercommand:flask create-user <name> <password> -
With flask shell:
2.1. Start a flask shell
flask shell2.2. Run this code to create a user:
from binder_gallery.models import User User.create_user("name", "password")
-
Create a config file
local_config.pyunder project folderbinder_gallery -
Put your custom configuration:
from config import Config as BaseConfig
class Config(BaseConfig):
# add your custom configuration here
- Define the env variable for custom config:
export BG_APPLICATION_SETTINGS=local_config.Config
# for windows
set BG_APPLICATION_SETTINGS=local_config.Config
- Remove GESIS related parts (templates, static files...)?
Funded by the German Research Foundation (DFG). FKZ/project number: 324867496.