Django 1.5.4:没有这样的表:admin /中的django_site [英] Django 1.5.4: no such table: django_site in admin/

查看:105
本文介绍了Django 1.5.4:没有这样的表:admin /中的django_site的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pip安装在南方,并在settings.py中将南方添加到INSTALLED_APPS,然后运行python manage.py migration,但是当我导航到localhost:8000 / admin时,它说

pip installed south, and added south to INSTALLED_APPS in settings.py and ran python manage.py migrate, but when I navigate to localhost:8000/admin, it says

没有这样的表:django_site

no such table: django_site

我的迁移没有成功运行吗?当我输入命令 python manage.py migration 时,它不再抛出任何错误,就像以前没有安装South时一样,它只会返回。

Did my migration not run successfully? When I enter the command python manage.py migrate it no longer throws any error like before when I didn't have South installed, it just returns.

我正在使用Windows 7和Pycharms。

I am using windows 7 and Pycharms.

推荐答案

您可能需要运行 syncdb 在第一次迁移之前:

You might need to run syncdb before the first migrate:

python manage.py syncdb
python manage.py migrate

django_site 应该已经存在,并且在您运行 syncdb

The django_site should already exist and it's created when you run syncdb

这篇关于Django 1.5.4:没有这样的表:admin /中的django_site的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆