manage.pysyncbd 不同步 django.contrib 应用程序
这可能是某个地方的设置错误。我有一个 Django 应用程序,可以在我的桌面上与开发人员服务器和 sqlite3 一起正常工作。
我将其上传到我的服务器和syncdb,它仅将我的自定义应用程序同步到我的数据库,而不是 django.contrib 应用程序。
我的 apache 配置:
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 \"%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>
我已安装的应用程序中有它们:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'money.accounting',
)
同步时没有收到任何错误。它只是像往常一样耗尽我的钱。会计应用程序。
我能够进入管理部分登录页面,因此它找到了一些 django 文件。
有什么想法吗?
谢谢! 海莉
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 \"%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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定表格尚未存在吗?请记住,
syncdb
现有表一旦创建就不会更改。如果从完全空的数据库开始会发生什么?如果这没有帮助,您确定设置文件引用的是您认为的数据库吗?
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?