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?
dev
or prod
using environment variablesMakefile
which helps with all the every-day tasksSentry <https://github.com/getsentry/sentry>
_ server.. class:: compact
Django 1.8 <https://djangoproject.com>
_
Initializr 4.0 <http://www.initializr.com/>
_ HTML5 template
Bootstrap 3.1.1 <http://getbootstrap.com/>
_HTML5 Boilerplate 4.3.0 <http://html5boilerplate.com/>
_jQuery 1.11.0 <https://jquery.com/>
_django-braces <https://github.com/brack3t/django-braces/>
_
django-crispy-forms <https://github.com/maraujop/django-crispy-forms>
_
django-grappelli <https://github.com/sehmaschine/django-grappelli>
_
django-model-utils <https://github.com/carljm/django-model-utils>
_
psycopg2 <http://initd.org/psycopg/>
_
Sphinx <http://sphinx-doc.org/>
_
.. class:: compact
django-configurations <http://django-configurations.readthedocs.org/>
_dj-database-url <https://github.com/kennethreitz/dj-database-url>
_envdir <http://envdir.readthedocs.org/>
_.. class:: compact
bumpversion <https://github.com/peritus/bumpversion>
_
django-debug-toolbar <https://github.com/django-debug-toolbar/django-debug-toolbar>
_
django-devserver <http://github.com/dcramer/django-devserver>
_
sqlparse <https://github.com/andialbrecht/sqlparse>
_Werkzeug <http://werkzeug.pocoo.org/>
_django-template-debug <https://github.com/calebsmith/django-template-debug>
_
Glances <https://github.com/nicolargo/glances>
_
IPython <http://ipython.org/>
_
pdb++ <https://bitbucket.org/antocuni/pdb/overview>
_
pg_activity <https://github.com/julmon/pg_activity>
_
.. class:: compact
check-manifest <https://github.com/mgedmin/check-manifest>
_doc8 <https://github.com/openstack/doc8>
_flake8 <https://gitlab.com/pycqa/flake8>
_isort <https://github.com/timothycrosley/isort>
_pep257 <https://github.com/GreenSteam/pep257>
_.. class:: compact
coverage <http://nedbatchelder.com/code/coverage/>
_django-coverage-plugin <https://github.com/nedbat/django_coverage_plugin>
_factory_boy <https://pypi.python.org/pypi/factory_boy>
_faker <https://github.com/joke2k/faker>
_fauxfactory <https://github.com/omaciel/fauxfactory>
_freezegun <https://github.com/spulec/freezegun>
_pytest <http://pytest.org/>
_pytest-django <http://pytest-django.readthedocs.org/>
_pytest-factoryboy <http://pytest-factoryboy.readthedocs.org/en/latest/>
_pytest-faker <https://github.com/pytest-dev/pytest-faker>
_tox <http://tox.testrun.org/>
_tox-pyenv <https://github.com/samstav/tox-pyenv>
_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.
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
.
This project is licensed under the New BSD License. See LICENSE
for the
full license.