Django1.7 'RemovedInDjango19Warning' when using apache with mod_wsgi
Question: i am using Django version 1.7 for an application, everything was running good
in my developpement PC (i was runnin it using `manage.py runserver` command.

now i am trying to move it to a production server. in the production server,
everything is still good when running the server using the `manage.py`command.

but accessing the application remotely (via apache2 & mod_wsgi), i get an
`RemovedInDjango19Warning` Exception.

after looking for a solution all i could find is how to ignore theses warnings
for manage.py which don't work for me and i don't know how to disable this
warnings from wsgi ?

**Traceback:**

    
    
    Environment:
    
    
    Request Method: GET
    Request URL: http://192.168.0.17/
    
    Django Version: 1.7.1
    Python Version: 3.4.3
    Installed Applications:
    ('django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'django_extensions',
     'rest_framework',
     'rest_framework_nested',
     'django_gravatar',
     'authentication',
     'djcelery',
     'job',
     'seed',
     'proxies',
     'emails')
    Installed Middleware:
    ('django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware')
    
    
    Traceback:
    File "/usr/local/lib/python3.4/dist-packages/django/core/handlers/base.py" in get_response
      98.                 resolver_match = resolver.resolve(request.path_info)
    File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py" in resolve
      343.             for pattern in self.url_patterns:
    File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py" in url_patterns
      372.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/usr/local/lib/python3.4/dist-packages/django/core/urlresolvers.py" in urlconf_module
      366.             self._urlconf_module = import_module(self.urlconf_name)
    File "/usr/lib/python3.4/importlib/__init__.py" in import_module
      109.     return _bootstrap._gcd_import(name[level:], package, level)
    File "/var/www/cvc.ma/CapValue/urls.py" in <module>
      6.                        url(r'^api/v1/auth/', include('authentication.urls')),
    File "/usr/local/lib/python3.4/dist-packages/django/conf/urls/__init__.py" in include
      28.         urlconf_module = import_module(urlconf_module)
    File "/usr/lib/python3.4/importlib/__init__.py" in import_module
      109.     return _bootstrap._gcd_import(name[level:], package, level)
    File "/var/www/cvc.ma/authentication/urls.py" in <module>
      2. from authentication.views import LoginView, LogoutView
    File "/var/www/cvc.ma/authentication/views.py" in <module>
      4. from rest_framework import permissions, viewsets, status, views
    File "/usr/local/lib/python3.4/dist-packages/rest_framework/viewsets.py" in <module>
      24. from rest_framework import views, generics, mixins
    File "/usr/local/lib/python3.4/dist-packages/rest_framework/views.py" in <module>
      11. from rest_framework.request import Request
    File "/usr/local/lib/python3.4/dist-packages/rest_framework/request.py" in <module>
      20. from rest_framework.settings import api_settings
    File "/usr/local/lib/python3.4/dist-packages/rest_framework/settings.py" in <module>
      22. from django.utils import importlib, six
    File "/usr/local/lib/python3.4/dist-packages/django/utils/importlib.py" in <module>
      10.     RemovedInDjango19Warning, stacklevel=2)
    
    Exception Type: RemovedInDjango19Warning at /
    Exception Value: django.utils.importlib will be removed in Django 1.9.
    


Answer: It's happening because the `django.utils.importlib` module is removed in
Django 1.9, in favor of the `importlib` in the standard library. Django Rest
Framework still uses it.

You can disable the warning by following the instructions on the accepted
answer of this question -- [How to suppress the deprecation warnings in
Django?](http://stackoverflow.com/questions/29562070/how-to-suppress-the-
deprecation-warnings-in-django)

