Skip to content

pythontanzania/pycon.or.tz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyCon Tanzania website uses a batteries-included Django starter project. For a production-ready version see the book Django for Professionals.


Table of Contents


📖 Installation

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

Pip

$ 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

$ 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

$ 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]

Setup

# 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

🤝 Contributing

Contributions, issues and feature requests are welcome! See CONTRIBUTING.md.

⭐️ Support

Give a ⭐️ if this project helped you!

License

The MIT License