0
0
Blender development fund website.
Go to file
2024-11-19 02:01:04 +08:00
assets_shared@b513d1ea6f UI: Devfund-website web-assets v2 upgrade 2024-11-01 16:41:12 +01:00
blender_fund Survey: Introducing Choices JS for nicer selectors 2024-10-10 00:05:13 +02:00
blender_fund_main Fix: Normalize checkout-form visual layout and rendering 2024-11-11 12:35:08 +01:00
blender_notes Upgrade to Django 4.2 2024-06-20 20:04:26 +02:00
campaign/simulator Campaign: revive code to make dummy gifts data for development 2023-12-31 13:23:31 +01:00
docs Docs: remove mkdocs 2024-09-12 17:33:49 +02:00
donation-box@643532b279 Version: Bump donation-box to v1.1.3 2024-11-05 10:52:36 +01:00
GeoLite2-Country_20181002 Set default currency based on GeoIP database 2018-10-09 12:30:26 +02:00
logentry_admin Breaking changes: account-less checkout 2023-10-26 16:07:53 +02:00
playbooks Playbooks: update to latest shared 2024-09-06 13:43:39 +02:00
templates Landing: Add campaign message 2024-11-19 02:01:04 +08:00
.coveragerc Tests: add coverage config 2023-11-23 11:44:28 +01:00
.env.example Remove Braintree vars from .env.example 2024-09-05 16:18:35 +02:00
.gitignore Ignore sqlite database file 2024-09-12 17:36:06 +02:00
.gitmodules UI: Devfund-website web-assets v2 upgrade 2024-11-01 16:41:12 +01:00
deploy.sh Playbooks: use shared, add new staging inventory 2024-08-12 11:50:22 +02:00
LICENSE.txt Add GPL 3 license file 2019-11-05 11:20:51 +01:00
manage.py Refactor into an example app 2018-06-27 19:57:20 +02:00
pyproject.toml Replace poetry with requirements{,_dev,_prod}.txt 2024-07-01 17:11:03 +02:00
README.md Docs: remove Wagtail section (no longer used) 2024-09-12 17:36:35 +02:00
requirements_dev.txt Docs: remove mkdocs 2024-09-12 17:33:49 +02:00
requirements_prod.txt Move psycopg2 requirement to requirements_prod 2024-09-05 16:19:37 +02:00
requirements.txt Move psycopg2 requirement to requirements_prod 2024-09-05 16:19:37 +02:00
setup.cfg deps: bump mypy, update setup.cfg 2024-07-11 12:09:23 +02:00

Table of Contents

Blender Development Fund

Requirements

Development

Setup

Create and activate a virtual environment using your favourite method, e.g.

python3.10 -m venv .venv
source .venv/bin/activate

Install required packages:

pip install -r requirements_dev.txt

Make a copy of example .env:

cp .env.example .env

Initialise submodules included into this repo:

git submodule update --init

Create the database tables and load some basic data to work with using the following commands:

./manage.py migrate
./manage.py loaddata systemuser devfund default_site
./manage.py collectmedia --noinput

Update /etc/hosts to point to fund.local, e.g.:

127.0.0.1	fund.local

Create superuser:

./manage.py createsuperuser

The last command creates an admin account that can be used to log in at http://fund.local:8010/admin/.

Run development server

./manage.py runserver 8010

Blender ID

Blender DevFund, as all other Blender web services, uses Blender ID.

For development, Blender ID's code contains a fixture with an OAuth app that should work without any changes to default configuration. To load this fixture, go to your development Blender ID and run the following:

./manage.py loaddata blender_development_fund_devserver

Stripe integration

TODO improve this section.

Follow the official guide for setting up Stripe CLI: https://stripe.com/docs/development/quickstart

Webhook testing

Run a local listener that will make webhook requests to your development server:

stripe listen --forward-to fund.local:8010/webhooks/stripe/

Run background tasks that are created by the webhook code:

./manage.py process_tasks

Documentation

See docs for more detailed documentation.

Testing

Run ./manage.py test --parallel to run all project's tests.

Use the --reuse-db option to speed up subsequent test runs. However, this skips the database migrations; add --create-db on the CLI to recreate the test database and run all the migrations when necessary.

GeoIP

The GeoIP database was downloaded from GeoLite2-Country

Deploy

See playbooks.