prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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)
  
  
  </issue>
  <code>
  [start of kombu/transport/django/__init__.py]
  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 of kombu/transport/django/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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'
  
verification_info: {"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"}]}