tutorial icon indicating copy to clipboard operation
tutorial copied to clipboard

post.publish() instead of Post.publish()

Open Raghav17 opened this issue 8 years ago • 1 comments

In the page: https://tutorial.djangogirls.org/en/django_orm/ A command line under the publish method it is mentioned post.publish() instead of Post.publish().

Raghav17 avatar Apr 11 '18 13:04 Raghav17

@Raghav17 - I will close this one, as publish method need to be executed in Post instance context. In this particular chapter one code block above You have:

post = Post.objects.get(title="Sample title")

and then:

post.publish()

so publish is resposible for publishing this post, that we got line above.

magul avatar Apr 11 '18 13:04 magul