removes root imports for django 1.9

Updated docs to promote submodule imports
This commit is contained in:
Ilan Steemers
2015-09-24 15:41:32 +02:00
parent 956e79a3a0
commit cef48da789
10 changed files with 46 additions and 34 deletions
+12 -7
View File
@@ -1,15 +1,20 @@
import os
import sys
from django import get_version
myPath = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, myPath)
from .tasks import async, schedule, result, result_group, fetch, fetch_group, count_group, delete_group, queue_size
from .models import Task, Schedule, Success, Failure
from .cluster import Cluster
from .status import Stat
from .brokers import get_broker
VERSION = (0, 7, 3)
VERSION = (0, 7, 4)
default_app_config = 'django_q.apps.DjangoQConfig'
# root imports will slowly be deprecated.
# please import from the relevant sub modules
if get_version().split('.')[1][0] != '9':
from .tasks import async, schedule, result, result_group, fetch, fetch_group, count_group, delete_group, queue_size
from .models import Task, Schedule, Success, Failure
from .cluster import Cluster
from .status import Stat
from .brokers import get_broker