This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Compatibility library for Django.

Project Description

django-nine - compatibility library for Django.

Prerequisites

  • Python 2.6, 2.7, 3.4, 3.5 and 3.6.
  • Django 1.5, 1.6, 1.7, 1.8, 1.9, 1.10 and 1.11.

Installation

Install latest stable version from PyPI:

pip install django-nine

Or latest stable version from GitHub:

pip install https://github.com/barseghyanartur/django-nine/archive/stable.zip

Or latest stable version from BitBucket:

pip install https://bitbucket.org/barseghyanartur/django-nine/get/stable.zip

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 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'] += \
    ['nine.context_processors.versions']

Or if you are using an old version of Django:

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

Import User model

Or you could safely import the user model as follows:

from nine.user import User

Testing

Simply type:

./runtests.py

Or use tox:

tox

Or use tox to check specific env:

tox -e py35

Or run Django tests:

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

License

GPL 2.0/LGPL 2.1

Support

For any issues contact me at the e-mail given in the Author section.

Author

Artur Barseghyan <artur.barseghyan@gmail.com>

Release History

Release History

This version
History Node

0.1.13

History Node

0.1.12

History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_nine-0.1.13-py2.py3-none-any.whl (8.0 kB) Copy SHA256 Checksum SHA256 2.7 Wheel May 16, 2017
django-nine-0.1.13.tar.gz (22.0 kB) Copy SHA256 Checksum SHA256 Source May 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting