Skip to content

Modernism in Architecture. A project to create visibility for modernist architecture in different places of the world.

License

Notifications You must be signed in to change notification settings

tech-dm-klymenko/modernism

 
 

Repository files navigation

Modernism in Architecture

A project to create visibility for modernist architecture in different places of the world.

The project is build with Django and Bulma.

Setup the backend

Prerequisites

Python version == 3.10.9

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.

PostgreSQL

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;

Install the project on your machine

Get the repository

$ git clone git@github.com:Modernism-in-Architecture/modernism.git

Setup a virtual environment and activate it

$ python -m venv env
$ source env/bin/activate

Install requirements

$(env) cd modernism/
$(env) pip install -r requirements.txt

Run migrations to setup the database

$(env) python manage.py migrate

Trouble shoot installing the Django project on Apple M1 machines

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

Create a superuser and insert testdata

$(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

Run the development server

$(env) python manage.py runserver

Admin login

You can login into the project's admin with the created superuser at http://127.0.0.1:8000/admin.

Setup the frontend

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.

Install requirements

$ npm install .

Start development server

$ npm run dev

About

Modernism in Architecture. A project to create visibility for modernist architecture in different places of the world.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 72.3%
  • JavaScript 21.2%
  • SCSS 6.5%