diff --git a/README.rst b/README.rst index d6c8777..ae39b86 100644 --- a/README.rst +++ b/README.rst @@ -7,15 +7,18 @@ Django-Db-Mailer .. image:: https://landscape.io/github/LPgenerator/django-db-mailer/master/landscape.svg :target: https://landscape.io/github/LPgenerator/django-db-mailer/master :alt: Code Health -.. image:: https://img.shields.io/badge/python-2.6,2.7,pypy,3.4,pypy3-blue.svg - :alt: Python 2.6, 2.7, pypy,3.4,pypy3 +.. image:: https://api.codacy.com/project/badge/grade/ad1442e15215494499ed08b80d4c41c5 + :target: https://www.codacy.com/app/gotlium/django-db-mailer + :alt: Codacy +.. image:: https://img.shields.io/badge/python-2.6,2.7,3.4+,pypy,pypy3-blue.svg + :alt: Python 2.6, 2.7, 3.4+, pypy, pypy3 :target: https://pypi.python.org/pypi/django-db-mailer/ .. image:: https://img.shields.io/pypi/v/django-db-mailer.svg :alt: Current version on PyPi - :target: https://crate.io/packages/django-db-mailer/ + :target: https://pypi.python.org/pypi/django-db-mailer/ .. image:: https://img.shields.io/pypi/dm/django-db-mailer.svg :alt: Downloads from PyPi - :target: https://crate.io/packages/django-db-mailer/ + :target: https://pypi.python.org/pypi/django-db-mailer/ .. image:: https://readthedocs.org/projects/django-db-mailer/badge/?version=latest :target: http://django-db-mailer.readthedocs.org/ :alt: Documentation Status diff --git a/dbmail/__init__.py b/dbmail/__init__.py index 3b10b8a..77c3886 100644 --- a/dbmail/__init__.py +++ b/dbmail/__init__.py @@ -21,7 +21,7 @@ def app_installed(app): def celery_supported(): try: - import tasks + from dbmail import tasks if not app_installed('djcelery'): raise ImportError @@ -43,7 +43,7 @@ def db_sender(slug, recipient, *args, **kwargs): backend = kwargs.get('backend', BACKEND['mail']) if celery_supported() and use_celery is True: - import tasks + import dbmail.tasks template = MailTemplate.get_template(slug=slug) max_retries = kwargs.get('max_retries', None) @@ -63,7 +63,7 @@ def db_sender(slug, recipient, *args, **kwargs): if send_after is not None: options.update({'countdown': send_after}) if template.is_active: - return tasks.db_sender.apply_async(**options) + return dbmail.tasks.db_sender.apply_async(**options) else: module = import_module(backend) if DEBUG is True: