Forums

Please help I am new to coding following is error, i am out clue what's wrong with it:Error code: Unhandled Exception;

[edited by admin: formatting]

import sys
import os

path = '/home/rawalonly/my-frist-blog/mysite/settings'
if path not in sys.path:
    sys.path.append(path)


#os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")

from django.core.wsgi import get_wsgi_application
from django.contrib.staticfiles.handlers import StaticFilesHandler

application = StaticFilesHandler(get_wsgi_application())

Next time you see that error, go to your error log and you should see more debug information.

Your path should be path = '/home/rawalonly/my-first-blog'

still error:

ImportError: No module named 'mysite'

please guide

Hi there, check out the debugging steps on this help page and let us know if they help?