This is a demo project of the blogging platform WhatYouKnow. Written using Django and Fomantic-ui.
Python 3.10
- Clone this repo
- Create a virtual environment and install the requirements:
cd whatyouknow
pipenv install
- Initialize virtual environment:
pipenv shell
- Create a file named
.env
Inside add:
SECRET_KEY={create_and_add_your_own_SECRET_KEY_here_with_no_spaces}
DEBUG=True
or you can just execute the generate-env.sh script:
chmod +x generate-env.sh
./generate-env.sh
NOTE:
For more information on how you can generate a secret key visit here or you can generate a key online here.
- Run migrations:
python manage.py migrate
- Run collect static:
python manage.py collectstatic
- Get the server up and running:
python manage.py runserver
or:
pipenv run server
To generate test data, run the command in a terminal:
python -m data_gen
And wait a little. To control the amount of data generated, specify a factor using the optional [-f, --factor]
argument:
python -m data_gen -f 5
To run in a container with all dependencies, download and install Docker. Then run the command in a terminal:
cd whatyouknow
docker-compose up
To generate test data (the container must be running):
docker-compose exec web python -m data_gen -f 5