We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Django Kombu app conflicts with Django app with Django 1.7
``` python
Traceback (most recent call last):
  File "manage.py", line 13, in <module>
    execute_from_command_line(sys.argv)
  File "/.../.env/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/.../.env/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/.../.env/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/.../.env/lib/python2.7/site-packages/django/apps/registry.py", line 89, in populate
    "duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: django
```

More info [here](https://docs.djangoproject.com/en/1.7/releases/1.7/#app-loading-refactor)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `kombu/transport/django/__init__.py`
Content:
```
1 """Kombu transport using the Django database as a message store."""
2 from __future__ import absolute_import
3 
4 from django.conf import settings
5 from django.core import exceptions as errors
6 
7 from kombu.five import Empty
8 from kombu.transport import virtual
9 from kombu.utils.encoding import bytes_to_str
10 from kombu.utils.json import loads, dumps
11 
12 
13 from .models import Queue
14 
15 try:
16     from django.apps import AppConfig
17 except ImportError:  # pragma: no cover
18     pass
19 else:
20     class KombuAppConfig(AppConfig):
21         name = __name__
22         label = name.replace('.', '_')
23         verbose_name = 'Message queue'
24     default_app_config = 'kombu.transport.django.KombuAppConfig'
25 
26 VERSION = (1, 0, 0)
27 __version__ = '.'.join(map(str, VERSION))
28 
29 POLLING_INTERVAL = getattr(settings, 'KOMBU_POLLING_INTERVAL',
30                            getattr(settings, 'DJKOMBU_POLLING_INTERVAL', 5.0))
31 
32 
33 class Channel(virtual.Channel):
34 
35     def _new_queue(self, queue, **kwargs):
36         Queue.objects.get_or_create(name=queue)
37 
38     def _put(self, queue, message, **kwargs):
39         Queue.objects.publish(queue, dumps(message))
40 
41     def basic_consume(self, queue, *args, **kwargs):
42         qinfo = self.state.bindings[queue]
43         exchange = qinfo[0]
44         if self.typeof(exchange).type == 'fanout':
45             return
46         super(Channel, self).basic_consume(queue, *args, **kwargs)
47 
48     def _get(self, queue):
49         m = Queue.objects.fetch(queue)
50         if m:
51             return loads(bytes_to_str(m))
52         raise Empty()
53 
54     def _size(self, queue):
55         return Queue.objects.size(queue)
56 
57     def _purge(self, queue):
58         return Queue.objects.purge(queue)
59 
60     def refresh_connection(self):
61         from django import db
62         db.close_connection()
63 
64 
65 class Transport(virtual.Transport):
66     Channel = Channel
67 
68     default_port = 0
69     polling_interval = POLLING_INTERVAL
70     channel_errors = (
71         virtual.Transport.channel_errors + (
72             errors.ObjectDoesNotExist, errors.MultipleObjectsReturned)
73     )
74     driver_type = 'sql'
75     driver_name = 'django'
76 
77     def driver_version(self):
78         import django
79         return '.'.join(map(str, django.VERSION))
80
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/kombu/transport/django/__init__.py b/kombu/transport/django/__init__.py
--- a/kombu/transport/django/__init__.py
+++ b/kombu/transport/django/__init__.py
@@ -18,7 +18,7 @@
     pass
 else:
     class KombuAppConfig(AppConfig):
-        name = __name__
+        name = 'kombu.transport.django'
         label = name.replace('.', '_')
         verbose_name = 'Message queue'
     default_app_config = 'kombu.transport.django.KombuAppConfig'

{"golden_diff": "diff --git a/kombu/transport/django/__init__.py b/kombu/transport/django/__init__.py\n--- a/kombu/transport/django/__init__.py\n+++ b/kombu/transport/django/__init__.py\n@@ -18,7 +18,7 @@\n     pass\n else:\n     class KombuAppConfig(AppConfig):\n-        name = __name__\n+        name = 'kombu.transport.django'\n         label = name.replace('.', '_')\n         verbose_name = 'Message queue'\n     default_app_config = 'kombu.transport.django.KombuAppConfig'\n", "issue": "Django Kombu app conflicts with Django app with Django 1.7\n``` python\nTraceback (most recent call last):\n  File \"manage.py\", line 13, in <module>\n    execute_from_command_line(sys.argv)\n  File \"/.../.env/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\n    utility.execute()\n  File \"/.../.env/lib/python2.7/site-packages/django/core/management/__init__.py\", line 354, in execute\n    django.setup()\n  File \"/.../.env/lib/python2.7/site-packages/django/__init__.py\", line 21, in setup\n    apps.populate(settings.INSTALLED_APPS)\n  File \"/.../.env/lib/python2.7/site-packages/django/apps/registry.py\", line 89, in populate\n    \"duplicates: %s\" % app_config.label)\ndjango.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: django\n```\n\nMore info [here](https://docs.djangoproject.com/en/1.7/releases/1.7/#app-loading-refactor)\n\n", "before_files": [{"content": "\"\"\"Kombu transport using the Django database as a message store.\"\"\"\nfrom __future__ import absolute_import\n\nfrom django.conf import settings\nfrom django.core import exceptions as errors\n\nfrom kombu.five import Empty\nfrom kombu.transport import virtual\nfrom kombu.utils.encoding import bytes_to_str\nfrom kombu.utils.json import loads, dumps\n\n\nfrom .models import Queue\n\ntry:\n    from django.apps import AppConfig\nexcept ImportError:  # pragma: no cover\n    pass\nelse:\n    class KombuAppConfig(AppConfig):\n        name = __name__\n        label = name.replace('.', '_')\n        verbose_name = 'Message queue'\n    default_app_config = 'kombu.transport.django.KombuAppConfig'\n\nVERSION = (1, 0, 0)\n__version__ = '.'.join(map(str, VERSION))\n\nPOLLING_INTERVAL = getattr(settings, 'KOMBU_POLLING_INTERVAL',\n                           getattr(settings, 'DJKOMBU_POLLING_INTERVAL', 5.0))\n\n\nclass Channel(virtual.Channel):\n\n    def _new_queue(self, queue, **kwargs):\n        Queue.objects.get_or_create(name=queue)\n\n    def _put(self, queue, message, **kwargs):\n        Queue.objects.publish(queue, dumps(message))\n\n    def basic_consume(self, queue, *args, **kwargs):\n        qinfo = self.state.bindings[queue]\n        exchange = qinfo[0]\n        if self.typeof(exchange).type == 'fanout':\n            return\n        super(Channel, self).basic_consume(queue, *args, **kwargs)\n\n    def _get(self, queue):\n        m = Queue.objects.fetch(queue)\n        if m:\n            return loads(bytes_to_str(m))\n        raise Empty()\n\n    def _size(self, queue):\n        return Queue.objects.size(queue)\n\n    def _purge(self, queue):\n        return Queue.objects.purge(queue)\n\n    def refresh_connection(self):\n        from django import db\n        db.close_connection()\n\n\nclass Transport(virtual.Transport):\n    Channel = Channel\n\n    default_port = 0\n    polling_interval = POLLING_INTERVAL\n    channel_errors = (\n        virtual.Transport.channel_errors + (\n            errors.ObjectDoesNotExist, errors.MultipleObjectsReturned)\n    )\n    driver_type = 'sql'\n    driver_name = 'django'\n\n    def driver_version(self):\n        import django\n        return '.'.join(map(str, django.VERSION))\n", "path": "kombu/transport/django/__init__.py"}], "after_files": [{"content": "\"\"\"Kombu transport using the Django database as a message store.\"\"\"\nfrom __future__ import absolute_import\n\nfrom django.conf import settings\nfrom django.core import exceptions as errors\n\nfrom kombu.five import Empty\nfrom kombu.transport import virtual\nfrom kombu.utils.encoding import bytes_to_str\nfrom kombu.utils.json import loads, dumps\n\n\nfrom .models import Queue\n\ntry:\n    from django.apps import AppConfig\nexcept ImportError:  # pragma: no cover\n    pass\nelse:\n    class KombuAppConfig(AppConfig):\n        name = 'kombu.transport.django'\n        label = name.replace('.', '_')\n        verbose_name = 'Message queue'\n    default_app_config = 'kombu.transport.django.KombuAppConfig'\n\nVERSION = (1, 0, 0)\n__version__ = '.'.join(map(str, VERSION))\n\nPOLLING_INTERVAL = getattr(settings, 'KOMBU_POLLING_INTERVAL',\n                           getattr(settings, 'DJKOMBU_POLLING_INTERVAL', 5.0))\n\n\nclass Channel(virtual.Channel):\n\n    def _new_queue(self, queue, **kwargs):\n        Queue.objects.get_or_create(name=queue)\n\n    def _put(self, queue, message, **kwargs):\n        Queue.objects.publish(queue, dumps(message))\n\n    def basic_consume(self, queue, *args, **kwargs):\n        qinfo = self.state.bindings[queue]\n        exchange = qinfo[0]\n        if self.typeof(exchange).type == 'fanout':\n            return\n        super(Channel, self).basic_consume(queue, *args, **kwargs)\n\n    def _get(self, queue):\n        m = Queue.objects.fetch(queue)\n        if m:\n            return loads(bytes_to_str(m))\n        raise Empty()\n\n    def _size(self, queue):\n        return Queue.objects.size(queue)\n\n    def _purge(self, queue):\n        return Queue.objects.purge(queue)\n\n    def refresh_connection(self):\n        from django import db\n        db.close_connection()\n\n\nclass Transport(virtual.Transport):\n    Channel = Channel\n\n    default_port = 0\n    polling_interval = POLLING_INTERVAL\n    channel_errors = (\n        virtual.Transport.channel_errors + (\n            errors.ObjectDoesNotExist, errors.MultipleObjectsReturned)\n    )\n    driver_type = 'sql'\n    driver_name = 'django'\n\n    def driver_version(self):\n        import django\n        return '.'.join(map(str, django.VERSION))\n", "path": "kombu/transport/django/__init__.py"}]}