Note about usage
Djangobox's usefulness has declined since Django 1.6 because it's
startproject
command now has a default database set up. It's useful for people who...
- ... have never used Django before (
Benjamin
build).- ... have never set up Django with Heroku before (
Batsunan
andjiro
build).- ... want an alternative way to create Django projects.
If you want to create a serious project have a look at a Django skeleton like django-twoscoops-project.
A tool to run the simplest Django builds in a few seconds.
Have you ever got frustrated how much tinkering it takes to just set up a minimal working Django project so you can play with models, forms, templates, views, ... ?
With Djangobox you can get a Django project running in about 10 seconds.
There are a few starting builds present (fab -l
), but ultimately you'll want to costumize your own build. Just put your build template in tools/build_templates
(look at the benjamin
template example). After running the build command your project will be in the autocreated box directory.
git clone https://github.com/RobrechtDR/djangobox.git
cd djangobox
mkvirtualenv djangobox
pip install -r requirements.txt
Assuming you are still in the djangobox environment, you can now start building!
Note: For using identical commands install virtualenv with virtualenvwrapper.
The simplest Django build. Suited for Django beginners to quickly experiment with a project.
Run a development server
fab build_benjamin:my_project
cd box/my_project
python manage.py runserver
The Benjamin build adapted for Heroku deployment.
If you haven't used Heroku before first do the three first steps of the quickstart guide.
Run a production server on Heroku
fab build_batsunan:my_project
cd box/my_project
fab heroku_setup:my-project-herokuapp-name
fab heroku_push
More
- Run a local management command:
fab manage_dev:dbshell
- Run a production management command:
fab manage_prod:dbshell
- Push to heroku:
heroku_push:"commit message"
Use this if you want to do more than just experimenting in Django; if you plan on using multiple apps. Also has Heroku integration.
Run a development server
fab build_jiro:my_project
cd box/my_project
fab manage_dev:runserver
TODO: Elaborate here. For now just look at fabfile.py
and tools/build_templates/benjamin
as an example.