我在当地的一个基于django的网站上工作。我的机器上安装了Django 1.5.4。现在我想在pythonanywhere上测试该网站。他们只支持Django 1.3和Django 1.6,但我读到大于1.3的版本应该在1.6(Reusing Django apps in own project wich require a lower django version)下工作
在调用syncdb时出现错误:
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 429, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 252, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 101, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 276, in __getattr__
self._setup()
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 142, in __init__
logging_config_func(self.LOGGING)
File "/usr/lib/python2.7/logging/config.py", line 803, in dictConfig
dictConfigClass(config).configure()
File "/usr/lib/python2.7/logging/config.py", line 568, in configure 'filter %r: %s' % (name, e))
ValueError: Unable to configure filter 'require_debug_false': Cannot resolve 'django.utils.log.RequireDebugFalse': No module named RequireDebugFalse
我读了一些关于'require_debug_false'的问题,但没有找到解决方案。 如何在Django 1.6下使用我的Django项目进行更改?
答案 0 :(得分:1)
检查virtualenv:
http://www.tonido.com/blog/index.php/2013/11/25/working-with-virtualenv-on-django-projects/ http://www.jeffknupp.com/blog/2012/02/09/starting-a-django-project-the-right-way/
使用virtualenv,您可以在机器中使用不同版本的django