开发者

manage.py syncbd not syncing django.contrib apps

This is probably a setting error somewhere. I have a django app that works fine on my desktop with the developer server and sqlite3.

I upload it to my server and syncdb and it only syncs my custom apps to my database, not the django.contrib apps.

My apache config:

ServerRoot "/home/myusername/webapps/accounting/apache2"

LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule python_module modules/mod_python.so
LoadModule rewrite_module modules/mod_rewrite.so

KeepAlive Off
Listen 40959
LogFormat "%{X-Forwarded-For}i %l %u %t \"%开发者_Python百科r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/myusername/logs/user/access_accounting.log combined
ErrorLog /home/myusername/logs/user/error_accounting.log
ServerLimit 2

<Location "/">
    PythonHandler django.core.handlers.modpython
    PythonPath "['/home/myusername/webapps/accounting', '/home/myusername/webapps/accounting/money', '/home/myusername/webapps/accounting/lib/python2.5', '/home/myusername/webapps/accounting/lib/python2.5/django'] + sys.path"
    SetEnv DJANGO_SETTINGS_MODULE money.settings
    SetHandler python-program
</Location>

I have them in my installed apps:

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.admin',
    'money.accounting',
)

I don't get any errors when I sync. It just sinks my money.accounting app just like normal.

And I am able to get to the admin section login page, so It's finding some of the django files.

Any ideas?

Thanks! Hailey


Are you sure that the tables are not already present? Remember syncdb doesn't alter existing tables once they've been created. What happens if you start from a completely empty database?

If that doesn't help, are you certain that the settings file is referring to the database you think it is?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜