GithubHelp home page GithubHelp logo

allyjweir / vagrant-django-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from torchbox/vagrant-django-template

0.0 1.0 0.0 337 KB

Skeleton project for a Django app running under Vagrant

Python 58.88% Shell 41.12%

vagrant-django-template's Introduction

vagrant-django-template

A template for new Django 1.7 projects developed under Vagrant. Features offered include:

  • A Vagrantfile for building an Ubuntu Precise based VM
  • A virtualenv (configured to be active on login), with project dependencies managed through a requirements.txt file
  • A PostgreSQL database (with the same name as the project, pre-configured in the project settings file)
  • Separation of configuration settings into base.py, dev.py and production.py (and optionally local.py, kept outside of version control) as per http://www.sparklewise.com/django-settings-for-production-and-development-best-practices/
  • South, django-devserver, django-compressor, django-debug-toolbar out of the box
  • A boilerplate base template with jQuery included, and various other ideas and best practices borrowed from https://github.com/h5bp/html5-boilerplate

Setup

Install Django 1.6 on your host machine. (Be sure to explicitly uninstall earlier versions first, or use a virtualenv - having earlier versions around seems to cause pre-1.4-style settings.py and urls.py files to be generated alongside the new ones.)

To start a new project, run the following commands:

django-admin.py startproject --template https://github.com/allyjweir/vagrant-django-template/zipball/master --name=Vagrantfile myproject
cd myproject
vagrant up
vagrant ssh
  (then, within the SSH session:)
./manage.py runserver 0.0.0.0:8000

This will make the app accessible on the host machine as http://localhost:8111/ . The codebase is located on the host machine, exported to the VM as a shared folder; code editing and Git operations will generally be done on the host.

See also

https://github.com/torchbox/vagrant-django-base - a recipe for a Vagrant base box that can be used in place of precise32 in the Vagrantfile - this has more of the server setup baked in, so that we can save time by not having to re-run those steps every time we create a new VM instance.

vagrant-django-template's People

Contributors

gasman avatar allyjweir avatar kaedroho avatar nealtodd avatar boblannon avatar vccabral avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.