Unified login system for all services around Blender. https://id.blender.org/
Go to file
2024-08-20 18:57:50 +02:00
assets_shared@41b3c16786 Update web-assets 2023-06-06 18:22:11 +02:00
bid_addon_support fix identation 2024-07-23 12:04:28 +02:00
bid_api API: remove create-user (Blender Store's legacy endpoint) 2024-07-29 12:27:49 +02:00
bid_main remove prints from an old migration 2024-08-16 12:11:57 +02:00
blenderid Settings: enable ADMINS mail if set via .env 2024-08-20 18:56:52 +02:00
docs API: remove create-user (Blender Store's legacy endpoint) 2024-07-29 12:27:49 +02:00
integration_tests Changed Cloud address in fixture and README to http://cloud.local:5001/ 2018-07-11 12:41:30 +02:00
playbooks WIP 2024-08-20 18:57:17 +02:00
templates List avatar at the authorize page 2024-06-03 11:01:47 +02:00
.env.example Missing .env.example 2024-07-30 09:36:20 +02:00
.gitignore use .env in settings.py 2024-07-23 18:14:35 +02:00
.gitmodules Playbooks: move everything to web-playbooks submodule 2024-07-29 11:15:42 +02:00
.pre-commit-config.yaml Update pre-commit deps 2024-05-31 15:44:02 +02:00
deploy.sh Playbooks: update deploy.sh 2024-07-29 12:22:04 +02:00
LICENSE.txt Add GPL 3 license file 2019-09-17 11:44:41 +02:00
manage.py Require Python 3.6 2017-06-13 16:47:30 +02:00
pyproject.toml pyproject: specify exptected python version 2024-04-08 16:57:49 +02:00
README.md Docs: test Gitea's include_toc 2024-07-29 12:03:21 +02:00
requirements_dev.txt use .env in settings.py 2024-07-23 18:14:35 +02:00
requirements_prod.txt use sqlite as a default in dev 2024-08-16 12:33:40 +02:00
requirements.txt use sqlite as a default in dev 2024-08-16 12:33:40 +02:00
setup.cfg PEP,docstrings: ignore more rules for now 2023-12-14 21:42:19 +01:00

Table of Contents

Blender ID

Blender ID is the unified login system for all services around Blender. With just one account you can set up a Blender Studio subscription or a Blender Development Fund membership, sign up for Blender Conference talks, manage your extensions at Blender Extensions Platform.

Development

Requirements

virtualenvwrapper adds commands for naming, creating, listing, activating and deactivating Python virtualenvs, which makes it much easier to work on various Python projects.

If you prefer not to use it, any other way of creating a virtualenv or venv will do.

Database setup

To create a new Blender ID database, run this as the PostgreSQL root user:

CREATE USER blender_id CREATEDB PASSWORD 'blender_id';
CREATE DATABASE blender_id OWNER blender_id;
CREATE SCHEMA blender_id;
GRANT ALL ON schema blender_id TO blender_id;

Password can be changed using the following:

ALTER ROLE blender_id WITH PASSWORD 'new_password';

In case of production, make sure that blender_id user has a good hard to guess password.

Development server setup

After cloning Blender ID repo, perform these steps to create a working dev server:

  • Copy development .env: cp .env.example .env;
  • Run git submodule update --init --recursive;
  • Create a virtual environment with Python 3.10:
    mkvirtualenv blender-id -a `pwd` -p /usr/bin/python3.10
    pip install -r requirements_dev.txt

Note that path to python3.10 binary might differ in your OS, adjust the mkvirtualenv command accordingly.

From this point on we assume you run everything with the virtual environment active.

  • Run ./manage.py migrate to migrate your database to the latest version;
  • Run ./manage.py createsuperuser to create super user;
  • Load fixtures:
   ./manage.py loaddata default_site
   ./manage.py loaddata default_roles
   ./manage.py loaddata flatpages
  • Run ./manage.py collectmedia to collect media from fixtures and place into the media directory;
  • Add 127.0.0.1 id.local to /etc/hosts;
  • Run DEBUG=True ./manage.py runserver

Development server is now available at http://id.local:8000/

Deploy

See playbooks.

Project layout and modules

├── assets_shared           # Blender Web Assets submodule: CSS, JS, etc. reused in Blender web-projects.
├── bid_addon_support       # Django app for the Blender ID add-on API (see below).
├── bid_api                 # Django app for APIs that are neither OAuth2 nor Blender ID add-on support
├── bid_main                # Main Django app, taking care of the web interface and OAuth2 authentication.
│   └── static              # Blender ID-specific asset sources (CSS, JS, etc.).
├── blenderid               # Django project, includes all the settings and top-level URL config.
│   └── .env.example        # Example development settings
└── playbooks               # Deployment playbooks and inventory
    └── shared              # Playbooks submodule reused in Blender web-projects.

OAuth

See OAuth.md.

Account deletion

See user_deletion.md.

Troubleshooting

"Site matching query does not exist."

Do this, activate Blender ID virtualenv environment and run:

./manage.py loaddata default_site

Then access your site at http://id.local:8000/. Add an entry to your hosts file if necessary.