Django rest_framework 不适用于 rhcloud.com

Django rest_framework does not work on rhcloud.com

我使用 django 创建了非常简单的应用程序,并且 运行able on rhcloud.com 但是当我尝试添加 rest_framework 时,如下所示

文件settings.py

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    "rest_framework"
]

文件urls.py

from django.conf.urls import include
urlpatterns = [
     url(r'^admin/', admin.site.urls),
     url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]

然后看到部署成功但是进入网页时,我得到error 503 Service Unavailable

我真的运行 pip install djangorestframework when remote ssh app

我使用的是 django 1.9.6,rest_framework3.3.3

如果你以前有解决方案,请分享给我

你用 djangorestframework 部门更新了 setup.py 了吗?

#!/usr/bin/env python

from setuptools import setup

setup(
    # GETTING-STARTED: set your app name:
    name='YourAppName',
    # GETTING-STARTED: set your app version:
    version='1.0',
    # GETTING-STARTED: set your app description:
    description='OpenShift App',
    # GETTING-STARTED: set author name (your name):
    author='Your Name',
    # GETTING-STARTED: set author email (your email):
    author_email='example@example.com',
    # GETTING-STARTED: set author url (your url):
    url='http://www.python.org/sigs/distutils-sig/',
    # GETTING-STARTED: define required django version:
    install_requires=[
        'Django==1.8.4',
        'djangorestframework==3.3.2',
    ],
    dependency_links=[
        'https://pypi.python.org/simple/django/',
        'https://pypi.python.org/simple/djangorestframework/',
    ],
 )