Git Product home page Git Product logo

django-headstart's Introduction

Django project template

This is a Django project template. It uses several best practices from all around the place and is optimized for use under Python 3. There shouldn't be any problems with it under older Pythons, though. The idea is that the project should be fully configurable with environment variables.

Additionally, I prefer putting project specific apps inside an 'apps' module, which gives us a way to have a nicer project structure in general.

To use this template, call startproject like this:

django-admin.py startproject --template=https://github.com/julianwachholz/django-project-template/archive/master.zip -e=py,rst,html,gitignore {{ project_name }}

Also you can or should probably remove this section from the README file after starting a project with this command.

{{ project_name }}

This is the README file for {{ project_name }}.

Quickstart

You'll be able to start working on this project with the following prerequisites:

  • Python 2.7+ or 3.3+
  • Django 1.7+
  • pip and virtualenv

You can roughly follow these simple commands to get a running application:

$ virtualenv {{ project_name }}-env
$ source {{ project_name }}-env/bin/activate

# Only required if you haven't setup your project yet. Remove these lines otherwise.
$ pip install https://www.djangoproject.com/download/1.7b1/tarball/
$ django-admin.py startproject --template=https://github.com/julianwachholz/django-project-template/archive/master.zip -e=py,rst,html {{ project_name }}

$ # Append basic environment variables to environment setup
$ echo "export DEBUG=1" >> {{ project_name }}-env/bin/activate
$ echo "export PYTHONPATH=$PWD/{{ project_name }}" >> {{ project_name }}-env/bin/activate
$ echo "export DJANGO_SETTINGS_MODULE={{ project_name }}.settings" >> {{ project_name }}-env/bin/activate
$ source {{ project_name }}-env/bin/activate

$ cd {{ project_name }}/
$ pip install -r requirements.txt
$ django-admin.py {migrate,runserver}

Of course, you'd want to setup a proper development environment. Refer to the complete docs/install in this case.

django-headstart's People

Contributors

julianwachholz avatar

Stargazers

 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.