Deploy Django on Apache?

前端 未结 3 1055
醉梦人生
醉梦人生 2021-01-28 15:02

I create project using Django 1.8. now ,I want deploy it to server.when I run this command in Ubuntu every thing working find.

python manage.py runserver
         


        
3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-28 15:32

    In your wsgi.py try changing

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
    

    to

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
    

    Since both files are in the same directory/module.

提交回复
热议问题