Correct show user, who edited post
This commit is contained in:
parent
a7a863ad39
commit
c3c6ed688d
2 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@
|
|||
<ul>
|
||||
<li>
|
||||
<a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>» {% link topic.forum %} </li><li>» {{ topic.name }}
|
||||
<a href="{% url djangobb:forum_feed "topic" %}{{ topic.id }}/"><img src="{{ MEDIA_URL }}/forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="breadcrumb_rss" /></a>
|
||||
<a href="{% url djangobb:forum_feed "topic" %}{{ topic.id }}/"><img src="{{ MEDIA_URL }}forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="breadcrumb_rss" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearer"></div>
|
||||
|
@ -86,7 +86,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% if post.updated %}
|
||||
<p class="postedit"><em>{% trans "Edited" %} {{ post.user }} ({% forum_time post.updated %})</em></p>
|
||||
<p class="postedit"><em>{% trans "Edited" %} {{ post.updated_by }} ({% forum_time post.updated %})</em></p>
|
||||
{% endif %}
|
||||
{% if post.attachments.all %}
|
||||
{% for attach in post.attachments.all %}
|
||||
|
|
|
@ -549,7 +549,9 @@ def edit_post(request, post_id):
|
|||
return HttpResponseRedirect(post.get_absolute_url())
|
||||
form = build_form(EditPostForm, request, topic=topic, instance=post)
|
||||
if form.is_valid():
|
||||
post = form.save()
|
||||
post = form.save(commit=False)
|
||||
post.updated_by = request.user
|
||||
post.save()
|
||||
return HttpResponseRedirect(post.get_absolute_url())
|
||||
|
||||
return {'form': form,
|
||||
|
|
Reference in a new issue