Unified login system for all services around Blender. https://id.blender.org/
Go to file
2024-08-26 10:54:53 +02:00
assets_shared@d37350f747 Chore: Update git submodule web-assets to v2.0.0-alpha.32 2024-08-23 17:35:35 +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 Fix: Style badges and toggles after web-assets v2 upgrade 2024-08-22 15:55:24 +02:00
blenderid Settings: do not disable existing loggers 2024-08-22 17:31:03 +02:00
docs API: remove create-user (Blender Store's legacy endpoint) 2024-07-29 12:27:49 +02:00
integration_tests
playbooks Playbooks: replace production inventory 2024-08-26 10:54:53 +02:00
templates UI: Blender-id web-assets v2 upgrade 2024-08-22 14:41:31 +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 UI: Blender-id web-assets v2 upgrade 2024-08-22 14:41:31 +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
manage.py
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 Deps: only install and use python-dotenv while in development 2024-08-22 17:27:06 +02:00
requirements_prod.txt use sqlite as a default in dev 2024-08-16 12:33:40 +02:00
requirements.txt Deps: only install and use python-dotenv while in development 2024-08-22 17:27:06 +02:00
setup.cfg

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.