我正在构建一个Django应用程序,现在我正在生产。我有这个问题:执行manage.py syncdb(所有没关系)后,我进入管理员,我无法找到模型表。我的admin.py文件存在,这是我的文件url.py:Django的生产 - 管理员没有db表加载
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'stambol.views.home', name='home'),
# url(r'^stambol/', include('stambol.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
)
问题在哪里?
你是什么意思的“无法找到模型表”?它在本地工作吗?你的生产环境与你的开发环境有什么不同(可能是nginx和runserver)? – dokkaebi
当我在admin pannel中输入时,我只找到了auth,site和group模型。我没有找到其他模型(在我的models.py中,我有很多模型)。本地它工作得很好。我认为我不知道如何重新启动生产服务器... – RoverDar