mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 02:38:11 +08:00
removes root imports for django 1.9
Updated docs to promote submodule imports
This commit is contained in:
+12
-7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user