We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如果 class Category 定义在Post的下面
south的时候 会出现 NameError: name 'Category' is not defined
建议加引号 po_type = models.ForeignKey('Category', verbose_name=u'文章分类', blank=True, null=True)
The text was updated successfully, but these errors were encountered:
这里我不是太明白,我在跑代码的时候,是没这个问题的呀。
Sorry, something went wrong.
你的 models 文件 https://github.com/wwq0327/djwebapp-blog/blob/master/djblog/blog/models.py
Category 是在Post上面的
我开始的时候定义顺序写反了 所以报错了 最好还是用字符串吧
我现在写的,都是我自己的用法,你说那种用法我没用过,所以我也没考虑到。
No branches or pull requests
如果 class Category 定义在Post的下面
south的时候 会出现
NameError: name 'Category' is not defined
建议加引号
po_type = models.ForeignKey('Category', verbose_name=u'文章分类', blank=True, null=True)
The text was updated successfully, but these errors were encountered: