0

i am confuring the apache mod_wsgi to django project

and here is my djangotest.wsgi file

import os
import sys
sys.path = ['/home/pavan/djangoproject'] + sys.path
os.environ['DJANGO_SETTINS_MODULE'] = 'djangoproject.settings'

import django.core.handlers.wsgi


_application = django.core.handlers.wsgi.WSGIHandler()

def application(environ, start_response):
    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
    return _application(environ, start_response)

and i add the WSGIScrptAlias to my virtual directory

when i try to get the homepage of the project it says the following error

ImproperlyConfigured: Requested setting MIDDLEWARE_CLASSES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

pavan
  • 334
  • 6
  • 20

1 Answers1

1

Looks like you have a typo on line 4. 'DJANGO_SETTINS_MODULE' should be 'DJANGO_SETTINGS_MODULE'.

Lars Ericsson
  • 1,059
  • 2
  • 7
  • 4