Will Vincent 4fa6a64ebe finish updating from "config" to "django_project" | 2 years ago | |
---|---|---|
accounts | 2 years ago | |
django_project | 2 years ago | |
pages | 2 years ago | |
static | 4 years ago | |
templates | 3 years ago | |
.gitignore | 2 years ago | |
CONTRIBUTING.md | 4 years ago | |
Dockerfile | 2 years ago | |
LICENSE | 3 years ago | |
Pipfile | 2 years ago | |
Pipfile.lock | 2 years ago | |
README.md | 2 years ago | |
docker-compose.yml | 2 years ago | |
homepage.png | 4 years ago | |
logo.png | 5 years ago | |
manage.py | 2 years ago | |
requirements.txt | 2 years ago |
A batteries-included Django starter project. For a production-ready version see the book Django for Professionals.
DjangoX 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/wsvincent/djangox.git
$ cd djangox
$ python3 -m venv .venv
$ source djangox/bin/activate
(.venv) $ pip install -r requirements.txt
(.venv) $ python manage.py migrate
(.venv) $ python manage.py createsuperuser
(.venv) $ python manage.py runserver
# Load the site at http://127.0.0.1:8000
$ pipenv install
$ pipenv shell
(djangox) $ python manage.py migrate
(djangox) $ python manage.py createsuperuser
(djangox) $ python manage.py runserver
# Load the site at http://127.0.0.1:8000
$ docker-compose up -d --build
$ 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 django_project/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
(.venv) $ python manage.py migrate
# Create a Superuser
(.venv) $ python manage.py createsuperuser
# Confirm everything is working:
(.venv) $ 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!