This repository contains the code that one would eventually have were they to go through the Django Girls tutorial.
Expressing my authorial rights, some things are a bit different from the tutorial:
-
A
Log inandLog outlinks on the page header -
A
Backlink within the blog-detail and blog-edit pages -
A more extensive
.gitignorefile -
A
.editorconfigfile -
An additional python package in the requirements.txt:
pycodestyle -
Within
mysite/settings.py,- Use of
Africa/Nairobias my TIME_ZONE - Use of
en-usas my LANGUAGE_CODE - Addition of
0.0.0.0and.herokuapp.comto the ALLOWED_HOSTS list
- Use of
In a python virtual environment, run:
pip install -r requirements.txtpython manage.py migrate blogpython manage.py createsuperuser(to create user that you'll use to log in)
python manage.py runserverNow, you are good to go. Your blog is ready.
python manage.py testNB: The app instance will run off the a preset admin user as set in init.sh.
To spin up the application using docker, ensure that Docker is installed. Then run:
docker-compose upOr in detached mode:
docker-compose up -dThe application will be live at 0.0.0.0:8000
- Click on
Log in(you'll be redirected to the Admin page) - On the admin page, fill in the credentials of the superuser created in Setup
- Click on the Log in button (You'll be redirected back to the page)
- Click on
Log outto log out.
- Log in
- Click on the
+button, enter the title and text - Finally hit the
Savebutton