Skip to content

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

Notifications You must be signed in to change notification settings

bitlabstudio/django-reusable-app-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

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

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.

tox

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

# 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

python setup.py register
python setup.py sdist upload

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published