title: Getting Error in middleware for the mobileesp While porting python2 project to python3
body: <p>I'm getting the error in the dependencies while porting python2 project with Django 1.1.11 to python 3.7 and Django 2.2.5.</p>
  
  <p>I'm using Django-mobileesp in the python2, when I have updated the code to python3 it gives the error for the Middleware for the UserAgent.</p>
  
  <blockquote>
    <p>Exception in thread django-main-thread:
        Traceback (most recent call last):
          File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
            self.run()
          File "/usr/lib/python3.7/threading.py", line 865, in run
            self._target(*self._args, **self._kwargs)
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
            fn(*args, **kwargs)
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 137, in inner_run
            handler = self.get_handler(*args, **options)
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 27, in get_handler
            handler = super().get_handler(*args, **options)
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 64, in get_handler
            return get_internal_wsgi_application()
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/core/servers/basehttp.py", line 45, in get_internal_wsgi_application
            return import_string(app_path)
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/utils/module_loading.py", line 17, in import_string
            module = import_module(module_path)
          File "/home/jarvis/Desktop/law3/lib/python3.7/importlib/<strong>init</strong>.py", line 127, in import_module
            return _bootstrap._gcd_import(name[level:], package, level)
          File "", line 1006, in _gcd_import
          File "", line 983, in _find_and_load
          File "", line 967, in _find_and_load_unlocked
          File "", line 677, in _load_unlocked
          File "", line 728, in exec_module
          File "", line 219, in _call_with_frames_removed
          File "/home/jarvis/Desktop/law3/src/lawersify/wsgi.py", line 5, in 
            application = get_wsgi_application()
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
            return WSGIHandler()
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/core/handlers/wsgi.py", line 135, in <strong>init</strong>
            self.load_middleware()
          File "/home/jarvis/Desktop/law3/lib/python3.7/site-packages/django/core/handlers/base.py", line 37, in load_middleware
            mw_instance = middleware(handler)
        TypeError: UserAgentDetectionMiddleware() takes no arguments</p>
  </blockquote>
  
  <p><strong>settings.py</strong></p>
  
  <pre><code>MIDDLEWARE =  [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django_mobileesp.middleware.UserAgentDetectionMiddleware'
  ]
  
  
  #middleware.py#
  
  from django.conf import settings
  from django.utils.functional import SimpleLazyObject
  
  DETECT_USER_AGENTS = getattr(settings, 'DETECT_USER_AGENTS', {})
  
  def lazy_detection(request, key):
      detector = DETECT_USER_AGENTS[key]
      return SimpleLazyObject( lambda: detector(request) )
  
  
  class UserAgentDetectionMiddleware(object):
      """
      Middleware to detect request's user agent
      """
      def process_request(self, request):
          for each in DETECT_USER_AGENTS:
              setattr( request, each, lazy_detection(request, each) )
  </code></pre>