Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bitlabstudio/django-reusable-app-template

A template for kickstarting reusable Django apps, ready to be published on pypi.python.org, ready for test driven development.
https://github.com/bitlabstudio/django-reusable-app-template

Last synced: 13 days ago
JSON representation

A template for kickstarting reusable Django apps, ready to be published on pypi.python.org, ready for test driven development.

Awesome Lists containing this project

README

        

Django Reusable App Template
============================

This repository aims to help you to kickstart new reusable Django apps within
a few minutes.

It was presented at PyCon Singapore 2013 for the first time, you can find the
slides of the talk here: https://speakerdeck.com/mbrochh/writing-publishing-and-maintaining-reusable-django-apps

A video of the talk can be found here: http://youtu.be/a4S1kTJfezA

In order to kickstart your new reusable app, just do the following

.. code-block:: bash

git clone git://github.com/bitmazk/django-reusable-app-template.git your-app-name
cd your-app-name
nano init.sh
# change all variables to your needs
./init.sh

The init script will replace all placeholders in the project files in the
``template`` folder with your desired values. Then it will rename a few
folders into your desired app name. Next it will remove the ``.git`` folder,
move everything from ``template`` into the root folder and create a first
initial commit. Now you have a new reusable app that does nothing, yet.

After this you can create the virtual environment or your app

.. code-block:: bash

mkvirtualenv -p python2.7 your-app-name
make develop

Now you can run the tests. You might want to modify `tox.ini` so that it only
runs tests for Python/Django versions that you intend to support.

.. code-block:: bash

tox

Or you can initiate the database and preview your app in the browser

.. code-block:: bash

# Django < 1.8:
./manage.py syncdb --all
./manage.py migrate --fake

# Django >= 1.8:
./manage.py migrate

./manage.py runserver

The only URL that is hooked up will be the admin url, so you can open
`localhost:8000/admin/`.

Once you have implemented your app, you can publish it on the Python Package
Index like so

.. code-block:: bash

python setup.py register
python setup.py sdist upload