1

Python 2.7を使用してpythonAnywhereにdjango 1.6.4プロジェクトをデプロイしようとしています

Web サイトのガイドラインに従って、仮想環境と wsgi ファイルを既に構成しています。しかし、サイトを確認すると 404 が表示されます。エラーlolはこれを教えてくれます:

ImportError: 設定 'tango_with_django_project.settings' をインポートできませんでした (sys.path にありますか? 設定ファイルにインポート エラーがありますか?): tango_with_django_project.settings という名前のモジュールはありません

これが私のwsgiです:

# +++++++++++ DJANGO +++++++++++

# TURN ON THE VIRTUAL ENVIRONMENT FOR YOUR APPLICATION
activate_this = '/home/pjestrada/.virtualenvs/rango/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

# To use your own django app use code like this:
import os
import sys
#
## assuming your django settings file is at '/home/pjestrada/mysite/settings.py'
path = '/home/pjestrada/rango/tango_with_django_project'

if path not in sys.path:
    sys.path.append(path)

os.chdir(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'tango_with_django_project.settings'
#
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

私のツリー:

├── Dropbox
│   ├── README.txt
│   └── __init__.py
├── README.txt
└── rango
    ├── LICENSE
    ├── README.md
    └── tango_with_django_project
        ├── manage.py
        ├── media
        │   ├── profile_images
        │   │   └── 10411981_634016890008979_1609187547738555774_n.jpg
        │   └── rango2.jpg
        ├── populate_rango.py
        ├── rango
        │   ├── __init__.py
        │   ├── __init__.pyc
        │   ├── admin.py
        │   ├── admin.pyc
        │   ├── bing_search.py
        │   ├── bing_search.pyc
        │   ├── forms.py
        │   ├── forms.pyc
        │   ├── models.py
        │   ├── models.pyc
        │   ├── tests.py
        │   ├── urls.py
        │   ├── urls.pyc
        │   ├── views.py
        │   └── views.pyc
        ├── static
        │   ├── about.jpg
        │   ├── css
        │   │   ├── bootstrap-fluid-adj.css
        │   │   ├── bootstrap-responsive.css
        │   │   ├── bootstrap-responsive.min.css
        │   │   ├── bootstrap.css
        │   │   └── bootstrap.min.css
        │   ├── img
        │   │   ├── glyphicons-halflings-white.png
        │   │   └── glyphicons-halflings.png
        │   ├── js
        │   │   ├── bootstrap.js
        │   │   ├── bootstrap.min.js
        │   │   ├── jquery-2.1.1.js
        │   │   └── rango-ajax.js
        │   └── rango.jpg
        ├── tango_with_django_project
        │   ├── __init__.py
        │   ├── __init__.pyc
        │   ├── settings.py
        │   ├── settings.pyc
        │   ├── urls.py
        │   ├── urls.pyc
        │   └── wsgi.py
        └── templates
            └── rango
                ├── about.html
                ├── add_category.html
                ├── add_page.html
                ├── base.html
                ├── category.html
                ├── category_list.html
                ├── index.html
                ├── login.html
                ├── page_list.html
                ├── profile.html
                ├── register.html
                ├── restricted.html
                └── search.html
4

1 に答える 1