nginx/wsgi/Virtualenv/pip/yolk/django 配置添加新模块
我的设置有一个小问题。我对 Django 世界还很陌生,所以请耐心等待。
一位熟悉的朋友为我的项目搭建了一个VPS(Ubuntu)。
我现在正在尝试添加一个新模块(南),这样我就可以使用manage.py migrate
当virtualenv被停用时,我安装了该模块
$ sudo pip -E /var/www/env/example.com install south
$ touch /var/www/sites/example.com.wsgi
$ source /var/www/env/example.com/bin/activate
它似乎进展顺利,
$ yolk -l
我看到了南模块。
当我在我的网站上运行时,
$ python manage.py syncdb
$ python manage.py migrate
我得到了这个错误:
$ python manage.py migrate
Unknown command: 'migrate'
Type 'manage.py help' for usage.
我对我正在做的事情没有完全理解,但我愿意学习。
也许有人可以指出我正确的方向?我错过了什么吗?
I'm having a small problem with my setup. I'm quite new to the Django world so bear with me.
A friend who is familiar has set up a VPS (Ubuntu) for my project.
I'm now on my own trying to add a new module (south) so I can use manage.py migrate
When the virtualenv was deactivated I installed the module
$ sudo pip -E /var/www/env/example.com install south
$ touch /var/www/sites/example.com.wsgi
$ source /var/www/env/example.com/bin/activate
It appeared to go fine
$ yolk -l
I see the south module.
at which point I run on my site
$ python manage.py syncdb
$ python manage.py migrate
I get this error though:
$ python manage.py migrate
Unknown command: 'migrate'
Type 'manage.py help' for usage.
I don't have a full understanding of what I'm doing but I'm willing to learn.
Maybe someone could point me in the right direction? Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您仍然需要将“south”添加到项目设置模块中的 INSTALLED_APPS 列表中。 Django 不使用 South 只是因为它安装在 PYTHONPATH 中:-)
这与服务器设置的其余部分无关,而与您如何配置 Django 本身有关。
You still have to add "south" to your INSTALLED_APPS list in your project's settings module. Django doesn't use south just because it is installed in the PYTHONPATH :-)
This has nothing to do with the rest of your server setup but just how you configure Django itself.