Hi,
On following page, tutorial says we should change post_new and post_edit method in views.py. I have completed every step in tutorial. We didn't add any class to views.py, put aside any method... It is confusing...
Currently when we're creating new posts using our New post form the post is published directly. To instead save the post as a draft, remove this line in blog/views.py in the post_new and post_edit methods:
post.published_date = timezone.now()
Also
Delete post
Let's open blog/templates/blog/post_detail.html once again and add this line:
just under a line with the edit button.
We have never added edit button to post_detail page...
Hi, On following page, tutorial says we should change post_new and post_edit method in views.py. I have completed every step in tutorial. We didn't add any class to views.py, put aside any method... It is confusing...
https://djangogirls.gitbooks.io/django-girls-tutorial-extensions/homework/
Save new posts as drafts
Currently when we're creating new posts using our New post form the post is published directly. To instead save the post as a draft, remove this line in blog/views.py in the post_new and post_edit methods:
post.published_date = timezone.now()
Also
Delete post
Let's open blog/templates/blog/post_detail.html once again and add this line:
just under a line with the edit button.
We have never added edit button to post_detail page...