Giter Club home page Giter Club logo

klingsbo's Introduction

Klingsbo - A sample Django app for Strider & Heroku

Klingsbo was built by going through the Django Tutorial, and then adding tests inspired by Daniel Lindsley's excellent tutorial on Django testing (part one, part two).

Klingsbo uses South for database migrations, PostgreSQL as the production database, and Gunicorn as the production webserver.

To setup Klingsbo on your dev box:

  1. create and activate a virtualenv

  2. run 'pip install -r requirements.txt' from within the project directory.

  3. run 'python manage.py syncdb --noinput'

  4. run 'python manage.py migrate'

The 'migrate' command will load the initial_data.json file which creates an admin user and the first poll. The admin username is 'admin' and the password is 'abc123'.

Notes:

Database setup: Klingsbo is configured to use PostgreSQL locally (ie on your dev box) and also when running the test suite on Strider. There is a sqlite dev configuration commented out in settings.py should you wish to to use sqlite locally instead of PostgreSQL. Heroku will add its own block of code to settings.py for production PostgreSQL.

Heroku setup: Strider will setup a new application on Heroku and do a git push to Heroku after each successful test run (if configured to 'deploy on green'). At this time, Strider does not run any 'one time' commands such as 'syncdb' or 'migrate'. You will need to run both of these commands before your project will run properly on Heroku.

The easiest way to do so is to install the Heroku Toolbelt, point the toolbelt at the right app, and then execute the commands from the command line like so:

  1. 'heroku run python manage.py syncdb --noinput'

  2. 'heroku run python manage.py migrate'

For more details on running Django projects on Heroku, see Getting Started with Django on Heroku/Cedar

Strider is a hosted continuous deployment platform for Python and node.js. Learn more at StriderApp.com.

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.