没有名为freetext的模块 - Django

时间:2012-05-28 14:47:09

标签: django freetext

我的django模块有一个名为freetext的问题。

没有关于如何在Django中安装它的信息。尝试在新服务器上运行Django时出现此错误:

[Mon May 28 13:47:45 2012] [error] mod_wsgi (pid=27668): Exception occurred processing WSGI script '/var/www/vhosts/domain.co.uk/sites/somod/apache/django.wsgi'.
[Mon May 28 13:47:45 2012] [error] Traceback (most recent call last):
[Mon May 28 13:47:45 2012] [error]   File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 250, in __call__
[Mon May 28 13:47:45 2012] [error]     self.load_middleware()
[Mon May 28 13:47:45 2012] [error]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 47, in load_middleware
[Mon May 28 13:47:45 2012] [error]     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Mon May 28 13:47:45 2012] [error] ImproperlyConfigured: Error importing middleware shop.cart.middleware: "No module named freetext"

如何安装此模块?

1 个答案:

答案 0 :(得分:2)

这样:

pip install -e https://github.com/howiworkdaily/django-freetext.git

更新,这不起作用,因为该应用程序没有setup.py,所以克隆它并将其放在某处PYTHONPATH可以找到它,或者更像submodule

或者只是在django项目中:

git clone https://github.com/howiworkdaily/django-freetext.git freetext

与manage.py相同的级别