The following tools are required to run this project:
- Git
- Docker and Docker Compose
- Poetry
- Python 3.11
- Download and install it from git-scm.com.
- Download Docker Desktop for Windows from Docker Hub and follow the installation instructions.
- Install Poetry by running
pip install --user poetry
in your command prompt.
- Download and install it from python.org.
- Run
sudo apt-get update
and thensudo apt-get install git
to install Git.
- Follow the official Docker installation guide for Ubuntu.
- After installing Docker, install Docker Compose by following the official guide.
- Run
curl -sSL https://install.python-poetry.org | python3
to install Poetry.
- Run
sudo apt-get update
and thensudo apt-get install python3.11
.
- If you have Homebrew installed, run
brew install git
. Otherwise, download and install it from git-scm.com.
- Download Docker Desktop for macOS from Docker Hub and follow the installation instructions.
- Run
brew install poetry
if you have Homebrew. Otherwise, runpip install --user poetry
.
- If you have Homebrew, run
brew install python@3.11
. Otherwise, download it from python.org.
Clone the workshop repository to your local machine.
git clone https://github.com/kdpisda/djangocon-us-2023-tdd-tutorial.git
Move to the project directory.
cd djangocon-us-2023-tdd-tutorial/
The workshop is divided into modules. Start by checking out to the initial branch.
git checkout main
cp .env.temp .temp
Then edit .env
to be whichever value you'd like, for example you could
use "dcus_tdd"
for all three. For production you'd want to use something
secure.
If you don't have Poetry installed, follow this guide. Then, run:
poetry install
Start the database and Redis containers.
docker-compose up -d
Run the database migrations.
poetry run python manage.py migrate
Create a superuser to access the admin interface.
poetry run python manage.py createsuperuser
Start the Django development server.
poetry run python manage.py runserver
Browse to http://127.0.0.1:8000/admin
and login using the superuser credentials to confirm everything is working as expected.
This guide should be adequate for an experienced Python developer to validate that the project setup is correct. If you encounter issues, please reach out during the pre-conference office hours for assistance.