master
Complete Django Girls Tutorial
This repository contains the code that one would eventually have were they to go through the Django Girls tutorial.
Differences
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
Setup
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)
Run the application
python manage.py runserver
Now, you are good to go. Your blog is ready.
Test
python manage.py test
The application will be live at 0.0.0.0:8000
Log in/ out
- 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.
Blog entry
- Log in
- Click on the
+button, enter the title and text - Finally hit the
Savebutton
Languages
Python
66%
HTML
16.4%
Dockerfile
10%
CSS
4.7%
Shell
2.9%