1.2 KiB
1.2 KiB
Website development set up
Start a shell in /website
and do the following:
- Create a
virtualenv
with Python 3.10 pip install poetry==1.4.2
poetry install
- Create a PostgreSQL user named
opendata
:sudo -u postgres createuser -d -l -P opendata
- Create a database named
opendata
:sudo -u postgres createdb -O opendata opendata
- Add
opendata.local
to/etc/hosts
as an alias of 127.0.0.1:127.0.0.1 localhost opendata.local # studio.local can be added on the same line as localhost ...
- Copy
opendata/settings.example.py
toopendata/settings.py
- Obtain an OAuth client and secret key from Blender ID and set the
BLENDER_ID.OAUTH_CLIENT
andBLENDER_ID.OAUTH_SECRET
properties. - Make sure your PostgreSQL settings are correct.
- Obtain an OAuth client and secret key from Blender ID and set the
./manage.sh migrate
- Create a superuser
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')" | python manage.py shell
yarn install
- Ensure
./test.sh
succeeds.
Optionally, you can import a snapshot of the benchmarks by using:
./manage.sh import_snapshot snapshot.jsonl