PyCon Tanzania website uses a batteries-included Django starter project. For a production-ready version see the book Django for Professionals.
PyCon website can be installed via Pip, Pipenv, or Docker depending upon your setup. To start, clone the repo to your local computer and change into the proper directory.
$ git clone https://github.com/pythontanzania/pycon.or.tz.git pycontz
$ cd pycontz
$ python3 -m venv pycontz
$ source pycontz/bin/activate
(pycontz) $ pip install -r requirements.txt
(pycontz) $ python manage.py migrate
(pycontz) $ python manage.py createsuperuser
(pycontz) $ python manage.py runserver
# Load the site at http://127.0.0.1:8000
$ pipenv install
$ pipenv shell
(pycontz) $ python manage.py migrate
(pycontz) $ python manage.py createsuperuser
(pycontz) $ python manage.py runserver
# Load the site at http://127.0.0.1:8000
$ docker build .
$ docker-compose up -d
$ docker-compose exec web python manage.py migrate
$ docker-compose exec web python manage.py createsuperuser
# Load the site at http://127.0.0.1:8000
For Docker, the INTERNAL_IPS
configuration in config/settings.py
must be updated to the following:
# config/settings.py
# django-debug-toolbar
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip[:-1] + "1" for ip in ips]
# Run Migrations
(pycontz) $ python manage.py migrate
# Create a Superuser
(pycontz) $ python manage.py createsuperuser
# Confirm everything is working:
(pycontz) $ python manage.py runserver
# Load the site at http://127.0.0.1:8000
Contributions, issues and feature requests are welcome! See CONTRIBUTING.md.
Give a ⭐️ if this project helped you!