Frontend and api server for Academy.
Install Python 3.9 and create a virtual environment:
python -mvenv ~/.cache/venvs/academy-web
Inside the virtual enviroment install pip-tools and install our dependencies with pip-sync
:
pip install pip-tools
pip-sync requirements.txt dev-requirements.txt
Install pre-commit hook to ensure files are formatted correctly:
pre-commit install
Then apply the database migrations:
./manage.py migrate
To start the server locally run:
./manage.py runserver
Some views uses Svelte components, which needs to be compiled. To do this, run the following:
cd svelte
./build_components
- Create a Facebook app: https://developers.facebook.com/apps/ (Disable uBlock Origin)
- Open the Graph API explorer: https://developers.facebook.com/tools/explorer
- Generate a User Token with permission
pages_manage_posts
- Run
./get_facebook_access_token
with the required arguments. It will output a Page Access Token that will never expire.