<commit_before>django-compat
=============
[![Build Status](https://travis-ci.org/arteria/django-compat.svg?branch=master)](https://travis-ci.org/arteria/django-compat)

For- and backwards compatibility layer for Django 1.4.x to 1.8.x

Consider [django-compat](https://github.com/arteria/django-compat) as an experiment based on the discussion [on reddit](http://redd.it/2jrr4l). 
Let's see where it goes.

# How to use django-compat

Install compat from the [PyPI](https://pypi.python.org/pypi/django-compat) or download and install manually. All relevant  releases are listed [here under releases](https://github.com/arteria/django-compat/releases).

Using one of the compatible objects is easy. For example

	from compat import patterns, url

	urlpatterns = patterns('ABC.views',
    		url(r'^abc/$', 'abc', name='abc-link'),
   	...
	
See a full example [here](https://github.com/arteria/django-hijack/blob/4966d8865e7e829a562ff2724771628c6590f841/hijack/urls.py#L1).



# Compatible objects

* atomic_decorator (commit_on_success replaced by atomic in Django >=1.8)
* BytesIO
* clean_manytomany_helptext
* EmailValidator
* force_text
* GenericForeignKey
* get_ident
* get_model_name
* get_user_model<commit_msg>added atomic', 'commit_on_success' to doc<commit_after>django-compat
=============
[![Build Status](https://travis-ci.org/arteria/django-compat.svg?branch=master)](https://travis-ci.org/arteria/django-compat)

For- and backwards compatibility layer for Django 1.4.x to 1.8.x

Consider [django-compat](https://github.com/arteria/django-compat) as an experiment based on the discussion [on reddit](http://redd.it/2jrr4l). 
Let's see where it goes.

# How to use django-compat

Install compat from the [PyPI](https://pypi.python.org/pypi/django-compat) or download and install manually. All relevant  releases are listed [here under releases](https://github.com/arteria/django-compat/releases).

Using one of the compatible objects is easy. For example

	from compat import patterns, url

	urlpatterns = patterns('ABC.views',
    		url(r'^abc/$', 'abc', name='abc-link'),
   	...
	
See a full example [here](https://github.com/arteria/django-hijack/blob/4966d8865e7e829a562ff2724771628c6590f841/hijack/urls.py#L1).



# Compatible objects

* atomic or commit_on_success (commit_on_success replaced by atomic in Django >=1.8)
* BytesIO
* clean_manytomany_helptext
* EmailValidator
* force_text
* GenericForeignKey
* get_ident
* get_model_name
* get_user_model
{'fraction_non_alphanumeric': 0.13273978146499393, 'fraction_numerical': 0.03318494536624848, 'mean_word_length': 4.928057553956834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '36371', 'n_tokens_mistral': 875, 'n_tokens_neox': 812, 'n_words': 193}