尝试从https://github.com/rosarior/django-inventory
安装'Django-inventory'解决依赖性错误后我得到了这个:
(inventory)root@ip-172-31-47-17:/home/admin# django-inventory.py runserver
Traceback (most recent call last):
File "/home/admin/inventory/bin/django-inventory.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/conf/__init__.py", line 128, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/home/admin/inventory/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/admin/inventory/local/lib/python2.7/site-packages/django_inventory/settings/local.py", line 4
SECRET_KEY = '@PK$vmu_W@=^hYy\<hwYKDX.)eX5-MAlsYJ?Y-v5EbRC7KZ)5CSg:bS2^?RJi/S@$j%L9Tc9^2j&&$<o)xpr.v?uiwvsT%d9sq;\'
^
SyntaxError: EOL while scanning string literal
(inventory)root@ip-172-31-47-17:/home/admin#
感谢任何解决此问题的指示。
答案 0 :(得分:0)
你的SECRET_KEY中的最后一个反斜杠正在逃避关闭单引号。删除它。