Skip to main content

Version checking library.

Project description

django-nine-v2 - version checking library for Django.

PyPI Version Supported Python versions Build Status Documentation Status GPL-2.0-only OR LGPL-2.1-or-later Coverage

Prerequisites

  • Python 3.7, 3.8, 3.9, 3.10. 3.11, 3.12, 3.13

  • Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, and 5.2

Documentation

Documentation is available on Read the Docs.

Installation

Install latest stable version from PyPI:

pip install django-nine-v2

Or latest stable version from GitHub:

pip install git+https://github.com/JahanzebNawaz/django-nine-v2.git

Usage

Get Django versions

In code

For example, if Django version installed in your environment is 1.7.4, then the following would be true.

from django_nine import versions

versions.DJANGO_1_7  # True
versions.DJANGO_LTE_1_7  # True
versions.DJANGO_GTE_1_7  # True
versions.DJANGO_GTE_1_8  # False
versions.DJANGO_GTE_1_4  # True
versions.DJANGO_LTE_1_6  # False

In templates

With use of context processors

Add nine.context_processors.versions to your context processors.

TEMPLATES[0]['OPTIONS']['context_processors'] += \
    ['django_nine.context_processors.versions']

Or if you are using an old version of Django:

TEMPLATE_CONTEXT_PROCESSORS += ['django_nine.context_processors.versions']

Testing

Simply type:

./runtests.py

Or use tox:

tox

Or use tox to check specific env:

tox -e py37

Or run Django tests:

./manage.py test nine --settings=settings.testing

License

GPL-2.0-only OR LGPL-2.1-or-later

Support

For any security issues contact me at the e-mail given in the Author section. For overall issues, go to GitHub.

Author

Jahanzeb Nawaz <mr.njahanzeb@gmail.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_nine_v2-0.2.8.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_nine_v2-0.2.8-py2.py3-none-any.whl (25.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django_nine_v2-0.2.8.tar.gz.

File metadata

  • Download URL: django_nine_v2-0.2.8.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0rc3

File hashes

Hashes for django_nine_v2-0.2.8.tar.gz
Algorithm Hash digest
SHA256 f21d3204112cf0b424b5419755edff2e194a1de114a6d206f41470121e78cb32
MD5 bba679f911efb1e5290c5fa763acfc2f
BLAKE2b-256 8c3335d863e40b6e6ae23407e79a44853acb2c1d1615284fadc3a57ec7addfda

See more details on using hashes here.

File details

Details for the file django_nine_v2-0.2.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_nine_v2-0.2.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 673352833242e0f9e2b03f89dd8f8f2a7f6b0f4790b6b10075354eba80e131b5
MD5 4706d7c7bd7961a00a6360f3a8c27b4d
BLAKE2b-256 71a6e1ebbec63b5145d2469389d4c61a3cb93d00129e28d67ef5801709784fa3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page