blob: 9113fdb91efa192a4e46e3e14851de1d5335896b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
""" Compatibility imports for Django. """
from django import VERSION
from django.db import transaction
# Django 1.6 deprecated commit_on_success() and introduced atomic() with
# similar semantics.
if VERSION[0] == 1 and VERSION[1] < 6:
transaction.atomic = transaction.commit_on_success
try:
# Django < 1.6
from django.conf.urls.defaults import url, patterns
except ImportError:
# Django > 1.6
from django.conf.urls import url, patterns
|