Problemas de django-cms en el servidor apache

I've installed Django 1.3 with django-cms. All is working perfect under self development webserver. While I install a fresh copy based on apache + mod_python, it has some problems that not meet in development.

Configuro el as the root link for cms, the physical directory is /www/domain/mycms.

  1. The first welcome webpage ( is show correcyly with the logo. but the admin( and the add-page( link is not correct. the should be like this ( and (
  2. While I manually enter the admin url(, I can get the login screen and got admin page. But in the pages screen, it can not show any page already created, and just show 'loading...' under the title 'Select page to change'. But I can manually input the link to edit and create the pages.
  3. In the page editing, it show the default available plugins(text, googlemap, file, link, picture, etc.) to select from drop-down list, but can not plus any. a message show below: 'No Plugins present. Add a plugin to this placeholder-slot.'

Any one can point out how to fix these problems? Thanks a lot.

I think it maybe due to the environment I build and have some incorrectly parameters.

Aquí está el medio ambiente:

1) apache virtual host config is below:

<VirtualHost *:80>
    DocumentRoot /www/domain

# The alias is for link the admin style file to apache.
    alias /static/admin/ /usr/share/pyshared/django/contrib/admin/media/

    <Location "/mycms/">
        SetHandler python-program
        PythonPath "['/www/domain/','/www/domain/mycms/'] + sys.path"
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE mycms.settings
        PythonInterpreter mycms
        PythonOption django.root /mycms
        PythonAutoReload On
        PythonDebug On

2) the is list the relevant config:

PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
WWW_DIR = '/mycms'

MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')

MEDIA_URL = WWW_DIR+'/media/'
STATIC_URL = WWW_DIR+'/static/'

ADMIN_MEDIA_PREFIX = '/static/admin/'

    ('example.html', 'Example Template'),


    os.path.join(PROJECT_DIR, 'templates'),

3) The is not changed as default.

preguntado el 10 de marzo de 12 a las 09:03

Django does not work well in subdirs. Can you put the project on separate sudomain? -

I tried Django on another subdirectories, not Django-cms, it seams work well. The directory is /www/domain/dtest. That's why I think it may works for cms because cms document point out the environment is depended by Django. -

Anyway, let me try to move the cms to another domain's root to test it. Thanks a advise. -

Please not that mod_python is deprecated in Django (see I suggest you look into mod_wsgi or wsgi servers such as gunicorn as alternatives. They increase your chances to get help online since more people are familiar with them. -

Thanks for information. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.