This repository has been archived by the owner on Feb 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 209
AttributeError: 'module' object has no attribute 'autocommit' #15
Comments
Which version of Django are you using? I've not yet merged in a pull request to get things working on Django 1.7 (#12) which may well fix this. |
Django 1.8 |
@johnsensible |
Sorry no. Very busy at the moment. Will try to get it sorted soon though. |
Hello, @johnsensible |
It should be working if you use the code from that pull request. However I've not had time to review that pull request and merge it in properly (mostly as I've not had any projects using Django 1.7 and django background task). |
та же проблема на django2 ! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When running 'python manage.py' after adding background-task in installed apps, I am getting following error 'AttributeError: 'module' object has no attribute 'autocommit'.
Full output is as follow.
Traceback (most recent call last):
File "manage.py", line 9, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/init.py", line 312, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/mhassan/second-vagrant-env/dev-platform/code/worksteps/testing/models.py", line 1148, in
@background(schedule=5)
File "/usr/local/lib/python2.7/dist-packages/background_task/init.py", line 5, in background
from tasks import tasks
File "/usr/local/lib/python2.7/dist-packages/background_task/tasks.py", line 115, in
class DBTaskRunner(object):
File "/usr/local/lib/python2.7/dist-packages/background_task/tasks.py", line 145, in DBTaskRunner
@transaction.autocommit
AttributeError: 'module' object has no attribute 'autocommit'
The text was updated successfully, but these errors were encountered: