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
$(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
.
Generally the project extends and overrides the Bulma Sass variables in the file modernism.static._sass.modernism.scss
.
Javascript functions can be found in modernism.static._js.modernism.js
.
$ npm install .
$ npm run dev