added prototyp capitle and edited post_draft
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user