A Website where people can publish and read articles (or follow projects) about scientifical topics.
If you want to contribute please make sure to not commit directly to the master or development branch. Instead, create a new branch from development and create a pull request with the development branch.
To clone and contribute to this project please follow these steps:
C:\
(on windows) and installing tox there.tox -e dev
./.tox/dev/Scripts/activate
.tox/dev/Scripts/python.exe
And that's it!
If you want to code on the stylesheets you will need to install a sass compiler.
E.g. on Windows you can use choco install sass
.
Hint: In PyCharm it is very comfortable to configure file watchers and scopes for the different scss main files.
For example, I configured two file watchers with its own scopes to compile main_base.scss
and main_index.scss
.
Below you can see an example of how you can configure such a file watcher:
You can define a custom scope, since you only need to recompile when code is changed affecting the main_base.scss
:
There are two different setups. The easy-to-use test server of django and a docker image emulating the production use-case.
To use the django test server simply run:
python manage.py runserver
The backend will use the sqlite file as database. If you change something in your code you should see the changes live in your browser - you don't have to restart the server.
The server is addressable at localhost:8000
.
Note: If you want to use djangos admin panel you may have to create the superuser first:
python manage.py createsuperuser
But if you didn't rebuilt the sqlite database there should already be a superuser. (user: admin, password: sekret1)
To use the docker setup - including backend and Postgres database server - run:
docker-compose up -d
If you changed something in the code you may have to rebuild the image:
docker-compose up -d --build
If you added a database migration or rebuilt the database volume you have to migrate these changes. You have two options to do so:
pulpscience_web_1
. Type:
python manage.py migrate
docker exec -it pulpscience_web_1 /bin/bash
python manage.py migrate
Alternatively, you can run this single command in the container directly with:
docker exec pulpscience_web_1 python manage.py migrate
To stop the docker container you can use:
docker-compose down
The server is addressable at localhost:8020
. Both setups can run parallel.
Note: For the testing .env
the admin account should be the same. (user: admin, password: sekret1)