Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Django Application Package Skeleton

The following features exists

  • Testing demo django test project with setup.py

  • Add Django apps required to execute test dynamically

  • Automatically update the version number with git

How to use

  1. Falk this project in your github

  2. Rename package directory as your app name and fix setup.py as you want

  3. Add your app in INSTALL_APPS in tests/settings.py

Testing demo django test project with setup.py

There is a simple blog django project in tests directory so just modify the project as you want and add:

$ python setup.py test

will run the project tests

Add Django apps required to execute test dynamically

If your Django app required apps just for testing then you can use app_testcase.AppTestCase to add any django app dynamically in test

If you create some django field app and you want to test the field with simple Book model then you can

  1. Create an simple app called yourfieldname/tests/apps/books

  2. Create simple book models in yourfieldname/tests/apps/books/models.py

  3. Use yourfieldname.tests.app_testcase.AppTestCase insted of django.test.TestCase and add yourfieldname.tests.apps.books` in ``install_apps field of test case:

    from app_testcase import AppTestCase
    
    class YourFieldTestCase(AppTestCase):
        install_apps = [
            'yourfieldname.tests.apps.books',
        ]
        # write your tests

Automatically update the version number with git

The original idea came from http://dcreager.net/2010/02/10/setuptools-git-version-numbers/

What you need to do is

  1. Add annotated or signed tag with the following command:

    $ git tag -a 0.1
  2. Then your git describe shows the tag name and python setup.py sdist create the tag named version package

  3. If you change anything and commit, your git describe may change and that is used as new version number and it become miner version up

  4. Add new annotated or signed tag when you release stable version.

Metadata

Release files for django-package-skeleton 0.1-2-gf7bf

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-package-skeleton 0.1-2-gf7bf
File Size Uploaded
django-package-skeleton-0.1-2-gf7bf.tar.gz 18.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-package-skeleton 0.1-2-gf7bf
File Interpreter ABI Platform
django_package_skeleton-0.1_2_gf7bf-py2.7.egg Legacy Egg format - - Details

Total release size: 61.5 kB

Release files / django-package-skeleton-0.1-2-gf7bf.tar.gz

Download URL django-package-skeleton-0.1-2-gf7bf.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f39a8b70b8b1621c93c54bb87dd472c91d1ff62732f7af0c6a06baf35045dd67
BLAKE2b-256 checksum
How to use checksums
ab43c87d3be3eaa3838a61631141e39e457e66f0ca68f72e96b071ab0d9cb1bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_package_skeleton-0.1_2_gf7bf-py2.7.egg

Download URL django_package_skeleton-0.1_2_gf7bf-py2.7.egg
Size 42.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
4dcf2690e8defd6125bb13669a5d92f96165c792b502b1240d2bac440a1ffd6c
BLAKE2b-256 checksum
How to use checksums
2a3e756a470e9eb9117437fbbaf7f21ed89241b77182c6453b859eafa9c337d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1-2-gf7bf This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page