GithubHelp home page GithubHelp logo

emilyemorehouse / django-base-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xenith/django-base-template

0.0 2.0 0.0 315 KB

A Django 1.5 base template with HTML5Boilerplate and Twitter Bootstrap

License: BSD 3-Clause "New" or "Revised" License

django-base-template's Introduction

{% if False %}

Django 1.5 Base Template

About

This template is based off of the work of Mozilla Playdoh and Two Scoops of Django, as well as experience with other Django layouts/project templates. Playdoh is mainly setup for Mozilla's systems, and is currently only designed for Django 1.4.

This project template is designed for Django 1.4's new startproject template option. This version of the project template is designed for Django 1.5.

As much as I could, all the code has been updated to use the new suggested layout and functionality in Django 1.5.

Features

By default, this project template includes:

A set of basic templates built from HTML5Boilerplate 4.1.0 and Twitter Bootstrap 2.3.1 (located in the base app)

Templating:

  • Markdown
  • django_compressor for compressing javascript/css/less/sass

Security:

  • bleach
  • python-bcrypt2 - uses bcrypt for password hashing by default

Background Tasks:

  • Celery

Migrations:

  • South

Caching:

  • python-memcached

Admin:

  • Includes django-admin-toolbar for development and production (enabled for superusers)
  • Includes django-debug-toolbar-user-panel, which is quite useful, but is disabled until it fully supports Django 1.5

Testing:

  • nose and django-nose
  • pylint, pep8, and coverage

Any of these options can added, modified, or removed as you like after creating your project.

How to use this project template to create your project

  • Create your working environment and virtualenv
  • Install Django 1.5 ($ pip install Django>=1.5)
  • $ django-admin.py startproject --template https://github.com/xenith/django-base-template/zipball/master --extension py,md,rst projectname
  • $ cd projectname
  • Uncomment your preferred database adapter in requirements/compiled.txt (MySQL, Postgresql, or skip this step to stick with SQLite)
  • $ pip install -r requirements/local.txt
  • $ cp projectname/settings/local-dist.py projectname/settings/local.py
  • $ python manage.py syncdb
  • $ python manage.py migrate
  • $ python manage.py runserver

That's all you need to do to get the project ready for development. When you deploy your project into production, you should look into getting certain settings from environment variables or other external sources. (See SECRET_KEY for an example.)

There isn't a need to add settings/local.py to your source control, but there are multiple schools of thought on this. The method I use here is an example where each developer has their own settings/local.py with machine-specific settings. You will also need to create a version of settings/local.py for use in deployment that you will put into place with your deployment system (Fabric, chef, puppet, etc).

The second school of thought is that all settings should be versioned, so that as much of the code/settings as possible is the same across all developers and test/production servers. If you prefer this method, then make sure all necessary settings are properly set in settings/base.py, and then edit settings/init.py so it no longer reraises the exception. (ie, by replacing 'raise' with 'pass'). As it is, settings/local.py should only be overriding settings from settings/base.py anyway. (You could also just set the DJANGO_SETTINGS_MODULE environment variable to "{{ project_name }}.settings.base" directly.)

{% endif %}

The {{ project_name|title }} Project

About

Describe your project here.

Prerequisites

  • Python 2.6 or 2.7
  • pip
  • virtualenv (virtualenvwrapper is recommended for use during development)

Installation

Fill out with installation instructions for your project.

License

This software is licensed under the New BSD License. For more information, read the file LICENSE.

django-base-template's People

Contributors

breyten avatar goinnn avatar markandrus avatar peterfschaadt avatar songpeng1997 avatar xenith avatar

Watchers

 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.