GithubHelp home page GithubHelp logo

django-project-template's Introduction

django-project-template

At Blimp, we love working with Django. For every project we start we always ended up doing the same thing. Installing Django, setting up environment settings, installing South, etc... So I decided to take all of that and create a Django Project Template to use with the startproject command new in Django 1.4. This template has a couple of useful settings and Fabric commands that make deploying, managing, and using Django with Heroku easier.

#How to install

django-admin.py startproject --template=https://github.com/jpadilla/django-project-template/zipball/master --extension=py,md,dev project_name

#Apps included Fabric South dj-database-url django-extensions gunicorn psycopg2

#Settings The manage.py script checks for an environment variable called ENVIRONMENT with values of STAGING or PRODUCTION. If none of those are found, development environment is assumed. We use this to automatically set DJANGO_SETTINGS_MODULE. This makes using manage.py easier because you dont have to keep remembering of writing --setting=project.settings.development. We converted settings.py into a module with settings splitted into three different files, development.py, staging.py, production.py. All of those import common settings from common.py and override them or set new ones depending on the environment.

#Fabric Script

##Environments fab development 'command' fab staging 'command' fab production 'command'

##Deployment fab production deploy fab production collectstatic fab brunchwatch fab brunchbuild

##DB fab staging resetdb fab schemamigration fab migrate fab updatedb

##Heroku fab production ps fab production restart fab production tail fab production shell fab production config

django-project-template's People

Contributors

jpadilla avatar

Watchers

 avatar  avatar  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.