Skip to content

kelda/django-polls

Repository files navigation

django-polls

This repo shows an example of using volumes to speed up Python development in Docker.

Check out the full post for information on how the repo works, or just try it out!

Running on Blimp

This example was originally created as an application for testing Blimp. Blimp is a development environment that runs in the cloud, but has the exact same workflow and config as Docker Compose.

This repo works with docker-compose up as well without any modifications.

Step 1: Clone the repo

git clone https://github.com/kelda/django-polls
cd django-polls

Step 2: Install Blimp

curl -fsSL 'https://kelda.io/get-blimp.sh' | sh

Or, via Homebrew:

brew install kelda/tools/blimp

Step 3: Login

blimp login

Step 4: Boot the docker-compose.yml

blimp up

This boots the docker-compose.yml, and sets up the declared volumes and tunnels.

If you're using Docker Compose, run docker-compose up instead.

Step 5: Test the code change

  1. Open localhost:8000, and vote a couple times. Note that each vote counts twice.
  2. Edit polls/views.py and fix the bug on line 51 by changing it to selected_choice.votes += 1.
  3. Refresh localhost:8000 and note how you can now see the votes for each option.

Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published