Skip to content
New issue

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

P142页 , 关于过滤的问题 #49

Open
SniperM99 opened this issue Feb 21, 2020 · 0 comments
Open

P142页 , 关于过滤的问题 #49

SniperM99 opened this issue Feb 21, 2020 · 0 comments

Comments

@SniperM99
Copy link

        try:
            tag = Tag.objects.get(id=tag_id)
        except Tag.DoesNotExist:
            post_list = []
        else:
            post_list = tag.post_set.filter(status=Post.STATUS_NORMAL)

这里的tag.post_set是什么作用? post_set是什么语法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant