项目作者: UltimatePython

项目描述 :
I want to register a model on my django admin and i got this error. Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Users\Ni~CODES> cd desktop PS C:\Users\Ni~CODES\Desktop> cd website PS C:\Users\Ni~CODES\Desktop\website> python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner self.run() File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\utils\autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\core\management\commands\runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\utils\autoreload.py", line 76, in raise_last_exception raise _exception[1] File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\core\management\__init__.py", line 357, in execute autoreload.check_errors(django.setup)() File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\utils\autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\__init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\apps\registry.py", line 122, in populate app_config.ready() File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\contrib\admin\apps.py", line 24, in ready self.module.autodiscover() File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\contrib\admin\__init__.py", line 26, in autodiscover autodiscover_modules('admin', register_to=site) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\utils\module_loading.py", line 47, in autodiscover_modules import_module('%s.%s' % (app_config.name, module_to_search)) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\Ni~CODES\Desktop\website\travello\admin.py", line 5, in admin.site.register(Destination) File "C:\Users\Ni~CODES\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django-3.0rc1-py3.7.egg\django\contrib\admin\sites.py", line 103, in register for model in model_or_iterable: TypeError: 'type' object is not iterable
高级语言:
项目地址: git://github.com/UltimatePython/Python-Model.git
创建时间: 2019-12-24T15:26:46Z
项目社区:https://github.com/UltimatePython/Python-Model

开源协议:

下载