added prototyp capitle and edited post_draft

This commit is contained in:
Esther Kleinhenz
2018-11-04 15:03:50 +01:00
parent acb8668991
commit 6c5bcb0131
18 changed files with 182 additions and 172 deletions
+2 -1
View File
@@ -21,7 +21,8 @@
<p>
Tags:
{% for tag in post.tags.all %}
<a href="{% url 'blog_search_list_view' %}">{{ tag.name }}, </a>
<a href="{% url 'blog_search_list_view' %}">{{ tag.name }} </a>
{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
<p>
+1
View File
@@ -77,6 +77,7 @@ def post_new(request):
post = form.save(commit=False)
post.author = request.user
post.save()
form.save_m2m()
return redirect('post_detail', pk=post.pk)
else:
form = PostForm()