mirror of
https://github.com/QingdaoU/Spirit.git
synced 2024-12-29 16:02:04 +00:00
* Fix #154. Bind actual func to the button.
This commit is contained in:
parent
4acd90d192
commit
ff5c9fe3bb
@ -51,7 +51,11 @@
|
||||
</div>
|
||||
|
||||
<ul class="comment-actions">
|
||||
<li><a href="#">{% trans "delete" %}</a></li>
|
||||
{% if not flag.comment.is_removed %}
|
||||
<li><a class="js-post" href="{% url "spirit:comment:delete" flag.comment.pk %}?next={% firstof request.get_full_path|urlencode '/' %}">{% trans "delete" %}</a></li>
|
||||
{% else %}
|
||||
<li><a class="js-post" href="{% url "spirit:comment:undelete" flag.comment.pk %}?next={% firstof request.get_full_path|urlencode '/' %}">{% trans "undelete" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -90,7 +90,7 @@ def delete(request, pk, remove=True):
|
||||
.filter(pk=pk)\
|
||||
.update(is_removed=remove)
|
||||
|
||||
return redirect(comment.get_absolute_url())
|
||||
return redirect(request.GET.get('next', comment.get_absolute_url()))
|
||||
|
||||
context = {'comment': comment, }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user