模板不存在Djangostack Bitnami Django 1.8

时间:2015-11-27 22:14:19

标签: mod-wsgi bitnami

我使用Djangostack Bitnami来部署网站     在开发服务器everefing是好的     但是在使用apach和mod_wsgi进行生产时,我得到错误模板不存在     这是我的httpd-app.conf

        <IfDefine !IS_DJANGOSTACK_LOADED>
      Define IS_DJANGOSTACK_LOADED
 WSGIDaemonProcess wsgi-djangostack processes=2 threads=15 display-name=%{GROUP}
</IfDefine>

我按https://wiki.bitnami.com/Components/Django#How_to_start_a_Django_project.3f完成所有操作 我的settings.py

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'account',
   # 'web_backend',
    'pinax_theme_bootstrap',
    'bootstrapform',
    'django_comments',
    'flot',
    'status',
    'dashboard',
    'latencies',
    'graphs',
    'klaus',


TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            os.path.join(BASE_DIR, 'templates'),
        ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
           #     'django.template.context_processors',
                'django_settings_export.settings_export',

 'django.contrib.auth.context_processors.auth',
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.template.context_processors.i18n',
                'django.template.context_processors.media',
                'django.template.context_processors.static',
                'django.template.context_processors.tz',
                'django.contrib.messages.context_processors.messages',
                'account.context_processors.account',
                'pinax_theme_bootstrap.context_processors.theme',
            ],
            'debug': False,
        },
    },
]

WSGI_APPLICATION = 'wsgi.application'

my wsgi.py

# coding: utf-8
from __future__ import unicode_literals

import os, sys, site

# Add the site-packages of the chosen virtualenv to work with

1 个答案:

答案 0 :(得分:1)

麻烦在apache配置中 需要在wsgiscripalias守护进程中添加python-path