相关疑难解决方法(0)

AttributeError:类型对象“Team”没有属性“_meta”

所以我对 Django 还很陌生,我似乎无法弄清楚这里发生了什么。我有一个正在运行并显示在网页中的表单,并且我能够创建一个数据库并在 SQL 中显示。但是,当我尝试获取表单以将信息保存到数据库中时,我开始测试的字段已经消失,并且没有任何内容写入数据库。

我也不断收到此错误:AttributeError: type object 'Team' has no attribute '_meta'

追溯:

Unhandled exception in thread started by <function wrapper at 0x108cbd050>
Traceback (most recent call last):
  File "/Users/alicen/git/first_robotics/venv/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Users/alicen/git/first_robotics/venv/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run
    self.check(display_num_errors=True)
  File "/Users/alicen/git/first_robotics/venv/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
    include_deployment_checks=include_deployment_checks,
  File "/Users/alicen/git/first_robotics/venv/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/Users/alicen/git/first_robotics/venv/lib/python2.7/site-packages/django/core/checks/urls.py", line 10, in check_url_config
    return check_resolver(resolver)
  File "/Users/alicen/git/first_robotics/venv/lib/python2.7/site-packages/django/core/checks/urls.py", line 19, in check_resolver
    for pattern in resolver.url_patterns:
  File …
Run Code Online (Sandbox Code Playgroud)

python sqlite django django-models django-forms

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

django ×1

django-forms ×1

django-models ×1

python ×1

sqlite ×1