Today we’re going to share with you how to create a separated Django application with the following requirements:
- must be a separated Django application for easier packaging and distribution.
- must be tested like it was tested within a Django project for the same development experience whether the application is within a Django application or a separated one.
- must have test coverage report to check the quality of project.
- must have coding convention checking for consistent style and best practices.
- must be built by travis-ci (or other ci system).
And we managed to meets these requirements with [django-html5-boilerplate] project.
Well, [django-html5-boilerplate] is just a simple Django application wrapper for
HTML5 Boilerplate1 so that you could extend and reuse it on your Django project with much ease,
- yes, it’s a separated Django application, could be easily installed with
- yes, it was setup to be tested with the help from
- yes, it was setup to have test coverage report with the help from
- yes, it was setup to have coding convention checking (
PEP 86 and more) with the help from
- yes, it was setup to be automatically built with the help from
travis-ci8. The build page is here at: https://travis-ci.org/teracy-official/django-html5-boilerplate
One feature that we really love from the ci system is that whenever a pull request is made, we
could see the build status immediately within that pull request thanks to the integration of
github. You could see a failed pull request here as an example:
At Teracy, we’re going to promote best development practices that we use every day, one of these is
Test Driven Development9 practice: “Test first, implement later, then refactor”. The pull
request just contain tests without any implementation, that’s why its build status was failed:
All the setup work was done on the project repository, please take a look and we believe that you
could setup yourself a similar
Django application easily from this sample project.
If there is anything missing that you could not setup yourself a project like this or you have a better approach, please let us know by commenting or forking the project, creating issues, making pull requests.
Have a nice day and happy hacking!