This repository has been archived by the owner. It is now read-only.
No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Vagrantfile for Django development

A Vagrantfile that brings up 2 VMs, one for Django, the other with a PostgreSQL database.

Requires Vagrant Host Manager Plugin. vagrant plugin install vagrant-hostmanager

To access Django development server on guest, from Host:

  • run python runserver on guest.
  • access on http://localhost:django_8000_fp/ on host, where django_8000_fp is the port specified in the Vagrantfile.

Database settings:

  • in
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'db',
        'USER': 'django',
        'PASSWORD': 'django',
        'HOST': 'db',
        'PORT': '5432',

I've written a blog post that expands on this a bit.