transcode-de / cookiecutter-django-project

:cookie: A Cookiecutter template we use for Django projects at transcode.
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link
cookiecutter django postgresql python

cookiecutter-django-project


.. image:: https://img.shields.io/travis/transcode-de/cookiecutter-django-project/master.svg :target: https://travis-ci.org/transcode-de/cookiecutter-django-project :alt: Build Status

.. image:: https://img.shields.io/requires/github/transcode-de/cookiecutter-django-project.svg :target: https://requires.io/github/transcode-de/cookiecutter-django-project/requirements/?branch=master :alt: Requirements Status

.. image:: https://badge.waffle.io/transcode-de/cookiecutter-django-project.svg?label=ready&title=issues%20ready :target: https://waffle.io/transcode-de/cookiecutter-django-project :alt: 'Stories in Ready'

A Cookiecutter <https://github.com/audreyr/cookiecutter> template we use for Django projects at transcode <http://www.transcode.de/>.

What makes this cookiecutter template special?

Batteries included

.. class:: compact

Configuration

.. class:: compact

Development Tools

.. class:: compact

Lint Tools

.. class:: compact

Testing

.. class:: compact

Creating a new Project

First you have to install Cookiecutter <https://github.com/audreyr/cookiecutter>_:

::

$ pip install cookiecutter

After that change to the directory where you want to create a your new Django project in. Then set up the project using this cookiecutter template like so:

::

$ cookiecutter gh:transcode-de/cookiecutter-django-project

You have to answer a few questions to configure the project. The defaults are good for transcode projects - surely you want to override them for yours.

Next Steps

Change into your newly created project directory and execute the following commands to get started.

You should create a new virtualenv for the project:

::

$ mkvirtualenv -a `pwd` my-project

Install the packages for development:

::

$ make develop

Then create the new PostgreSQL user and database:

::

$ make create-db-user
$ make create-db

The next step is to create the Django app(s) you want for the project. Just run the startapp task to create new Django app(s):

::

$ make startapp

Now create the database tables:

::

$ make migrate

And create a new Django superuser:

::

$ envdir envs/dev/ python manage.py createsuperuser

Finally start the development webserver:

::

$ make runserver

To see the other targets available in the Makefile simply run:

::

$ make

Detailed installation instructions can be found in your new project under docs/installation.rst.

License

This project is licensed under the New BSD License. See LICENSE for the full license.