ProgrammingError" forum_userprofile"不存在

时间:2015-07-07 19:55:28

标签: python django django-models django-views

使用http://lightbird.net/dbe2/forum.html获取此错误消息 但我不确定如何破译错误消息或在何处调试此错误消息。 我尝试在管理员和实际网站中添加它。

ProgrammingError at /admin/forum/userprofile/add/

relation "forum_userprofile" does not exist
LINE 1: SELECT (1) AS "a" FROM "forum_userprofile" WHERE "forum_user...
                           ^

Request Method:     POST
Request URL:    http://127.0.0.1:8000/admin/forum/userprofile/add/
Django Version:     1.8.2
Exception Type:     ProgrammingError
Exception Value:    

relation "forum_userprofile" does not exist
LINE 1: SELECT (1) AS "a" FROM "forum_userprofile" WHERE "forum_user...
                           ^

Exception Location:     /home/--/pdenv/lib/python3.4/site-packages/django/db/backends/utils.py in execute, line 64
Python Executable:  /home//pdenv/bin/python
Python Version:     3.4.3
Python Path:    

['/home/--/dogs-like-me',
'/home/--/pdenv/lib/python34.zip',
'/home/--/pdenv/lib/python3.4',
'/home/--/pdenv/lib/python3.4/plat-linux',
'/home/--/pdenv/lib/python3.4/lib-dynload',
'/usr/local/lib/python3.4',
'/usr/local/lib/python3.4/plat-linux',
'/home/--/pdenv/lib/python3.4/site-packages',
'/home/--/pdenv/lib/python3.4/site-packages/newrelic-2.52.0.40']

Server time:    Tue, 7 Jul 2015 19:47:39 +0000

修改 我尝试在管理页面和python shell中添加一个forum_userprofile,但它给了我这个错误:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/seanna/pdenv/lib/python3.4/site-packages/django/db/models/manager.py", line 264, in __get__
    self.model._meta.object_name,
AttributeError: Manager isn't available; BasicModel is abstract

1 个答案:

答案 0 :(得分:1)

我认为您尚未应用迁移:$ python manage.py migrate

Django Docs