A project to create visibility for modernist architecture in different places of the world.
The project is build with Django and Bulma.
To check the Python version on your system, run
$ python --version
Python 3.10.9
or
$ python3 --version
Python 3.10.9
If an older version or nothing is found you will need to update or install Python first. If this causes trouble, just try to install the requirements, it might work with an older Python version too. We recommend using pyenv
to manage your Python versions.
Create a postgreSQL database named "modernism". You can go with whatever name you like but if you choose another name, you will need to adapt the database settings within the Django project setting file.
If you use the PostgreSQL CLI psql
, you can go like this:
Start the database server (if you are on an Intel machine the path would probably start with /usr/local/
instead of /opt/homebrew/
). You might have a different PostgreSQL version or installation path and want to adapt the command accordingly.
$ postgres -D /opt/homebrew/var/postgresql@14
or if you installed PostgreSQL on Mac via homebrew, you can start the server like so too:
$ brew services start postgresql@14
Connect to the PostgreSQL interactive terminal
$ psql postgres
postgres=# CREATE DATABASE modernism;
$ git clone git@github.com:Modernism-in-Architecture/modernism.git
$ python -m venv env
$ source env/bin/activate
$(env) cd modernism/
$(env) pip install -r requirements.txt
$(env) python manage.py migrate
You might experience errors running pip install
or the migrations on M1 machines with the reportlab
library.
Try installing following libraries:
$ brew install libjpeg
$ brew install freetype
Rebuild the reportlab
library within the project env:
$(env) pip install reportlab --force-reinstall --no-cache-dir --global-option=build_ext
If you receive one of the following errors:
No matching distribution found for asgiref==3.7.2
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
However, this might be connected to a missing old openssl package version. We could fix this by additionally installing openssl@1.1.
$ brew install openssl@1
$(env) python manage.py createsuperuser
Please get in touch and we can provide a database dump to load into your local database, so you do not need to create pages manually.
$(env) python manage.py loaddata test_data.json
$(env) python manage.py runserver
You can login into the project's admin with the created superuser at http://127.0.0.1:8000/admin
.
$(env) pytest
There is a Makefile on the root level containing most of the commands above for your convenience.
Generally the project extends and overrides the Bulma Sass variables in the file modernism.static._sass.modernism.scss
.
Javascript files can be found in the folder modernism.static.lib
.
$ npm install .
$ npm start