Changeset 243:f378986cde18


Ignore:
Timestamp:
17.02.2010 15:15:27 (2 years ago)
Author:
slav0nic <slav0nic0@…>
Branch:
default
Message:

Correct show user, who edited post

Location:
djangobb/djangobb_forum
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • djangobb/djangobb_forum/templates/forum/topic.html

    r217 r243  
    1414                        <li> 
    1515                        <a href="{% url djangobb:index %}">{% trans "Root" %} </a></li><li>&raquo; {% link topic.forum %} </li><li>&raquo; {{ topic.name }} 
    16                         <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> 
     16                        <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> 
    1717                        </li> 
    1818                </ul> 
     
    8787                                        {% endif %} 
    8888                                        {% if post.updated %} 
    89                                                 <p class="postedit"><em>{% trans "Edited" %} {{ post.user }} ({% forum_time post.updated %})</em></p> 
     89                                                <p class="postedit"><em>{% trans "Edited" %} {{ post.updated_by }} ({% forum_time post.updated %})</em></p> 
    9090                                        {% endif %} 
    9191                                        {% if post.attachments.all %} 
  • djangobb/djangobb_forum/views.py

    r241 r243  
    550550    form = build_form(EditPostForm, request, topic=topic, instance=post) 
    551551    if form.is_valid(): 
    552         post = form.save() 
     552        post = form.save(commit=False) 
     553        post.updated_by = request.user 
     554        post.save() 
    553555        return HttpResponseRedirect(post.get_absolute_url()) 
    554556 
Note: See TracChangeset for help on using the changeset viewer.