This is the source code of the website nouvelles.exnihil.fr.
The site presents texts and novellas written by Florent Naud about a fictional futuristic universe.
- Postgresql
- Python Django
- Bulma CSS
- node-sass
$ make setenv ## Create and fill .env file for development
$ make start ## Launch project with postgres database, migration and django web server
$ make seed-local-db ## Fill db container with test data
$ make css-watch ## Compile scss files with watch mode if you want to work on
or
$ make css-build ## Compile scss files
$ make collectstatic ## Launch collectstatic command in the docker web container and copy static folder on the host machine
- postgresql with a db
nouvelles_exnihil
- pipenv
- python 3.6
- psycopg2-binary 2.8.6
- node v16.17.0
$ pipenv shell
$ pipenv install
Generate a value for DJANGO_SECRET_KEY:
$ python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
Create .env file with:
DEBUG=True
DJANGO_SECRET_KEY='<your DJANGO_SECRET_KEY generated above>'
POSTGRES_PASSWORD='<your postgres user>'
POSTGRES_USER='<your postgres user>'
ALLOWED_HOSTS='localhost'
Export every var as environment variable:
$ export $(cat .env | xargs)
- Launch django
$ python manage.py migrate
$ python manage.py runserver
- Generate css from scss
$ cd style
$ yarn install
$ yarn start
- Regenerate static folder
$ python manage.py collectstatic --noinput --clear