diff options
author | King | 2018-04-16 08:55:15 +0000 |
---|---|---|
committer | GitHub | 2018-04-16 08:55:15 +0000 |
commit | 4cb232eccc189983a484f44f9b4396780435b859 (patch) | |
tree | 3df0b73b3a5e620f94237a9b7d15f28ad2260ef9 | |
parent | 73f4987e21ed3aa855203812cbe94c8a67061d5c (diff) | |
download | learn_django-4cb232eccc189983a484f44f9b4396780435b859.tar.gz learn_django-4cb232eccc189983a484f44f9b4396780435b859.tar.bz2 learn_django-4cb232eccc189983a484f44f9b4396780435b859.zip |
Format properly
-rw-r--r-- | tutorial_7_django_forms/slides.md | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tutorial_7_django_forms/slides.md b/tutorial_7_django_forms/slides.md index 977eb07..b81aaa7 100644 --- a/tutorial_7_django_forms/slides.md +++ b/tutorial_7_django_forms/slides.md @@ -158,10 +158,11 @@ Demonstration if form.is_valid(): form.save() return HttpResponse("Blog created") - blog_form = BlogForm(instance=blog) + blog_form = BlogForm(instance=blog) context = {'form': blog_form, 'blog': blog} return render(request, 'add_blog.html', context) + **Template for the view** - In ```add_blog.html``` add following @@ -188,14 +189,13 @@ Slide 10: **Edit Templates to add new URL redirect** -- Edit the ```blogs.html``` as follows; +- Edit the ```/blog/templates/blog/blogs.html``` as follows; + - # /blog/templates/blog/blogs.html - - <html> - <body> - <h2><a href='/blog/add_blogs/'>Add New Blog</a></h2> - {% if blogs %} + <html> + <body> + <h2><a href='/blog/add_blogs/'>Add New Blog</a></h2> + {% if blogs %} . . <ul> @@ -205,11 +205,11 @@ Slide 10: . . </ul> - {% else %} - <p>No Blogs are available.</p> - {% endif %} - </body> - </html> + {% else %} + <p>No Blogs are available.</p> + {% endif %} + </body> + </html> *** With this we come to the end of the tutorial*** ---------------------------------------------------- |