Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.21 KB

README.rst

File metadata and controls

39 lines (28 loc) · 1.21 KB

DJANGO_APP_TEMPLATE

This template provides boilerplate code for starting a django app as a python distribution.

Usage

The intention is to make use of the django_extensions command create_app like so:

python manage.py create_app -t /path/to/DJANGO_APP_TEMPLATE/TEMPLATE -p /path/to/distributions {{ app_name }}

Automatic replacement of username, email and gituser in setup.py requires django_extensions version 0.7.1 or greater. Once you've got that, add a dictionary like this to your settings.py:

EXTENSIONS_REPLACEMENTS = {
    'username': 'My Name',
    'email': '[email protected]',
    'gituser': 'mygituser',
}

Then, assuming you're using github for version control, you can initialize your new repository:

cd /path/to/distributions/{{ app_name }}
git init
git commit -a
git remote add origin [email protected]:<username>/django-{{ app_name }}.git

Once you've got your version control going, you can use pip to install the distribution as an editable.

pip install -e [email protected]:<username>/django-{{ app_name }}.git#egg=django-{{ app_name }}