Show More
@@ -50,7 +50,7 b'' | |||
|
50 | 50 | {% if user.is_moderator %} |
|
51 | 51 | <span class="moderator_info"> |
|
52 | 52 | ({{ thread.poster_ip }}) |
|
53 | [<a href="{% url 'delete' post_id=thread.id %}" | |
|
53 | [<a href="{% url 'delete' post_id=thread.id %}?next={{ request.path }}" | |
|
54 | 54 | >{% trans 'Delete' %}</a>] |
|
55 | 55 | </span> |
|
56 | 56 | {% endif %} |
@@ -1,5 +1,6 b'' | |||
|
1 | 1 | import hashlib |
|
2 | 2 | from django.core.urlresolvers import reverse |
|
3 | from django.http import HttpResponseRedirect | |
|
3 | 4 | from django.template import RequestContext |
|
4 | 5 | from django.shortcuts import render, redirect, get_object_or_404 |
|
5 | 6 | from django.utils import timezone |
@@ -232,7 +233,7 b' def delete(request, post_id):' | |||
|
232 | 233 | Post.objects.delete_post(post) |
|
233 | 234 | |
|
234 | 235 | if NO_PARENT == post.parent: |
|
235 |
return redirect( |
|
|
236 | return _redirect_to_next(request) | |
|
236 | 237 | else: |
|
237 | 238 | return redirect(thread, post_id=post.parent) |
|
238 | 239 | |
@@ -329,3 +330,8 b' def _get_user(request):' | |||
|
329 | 330 | user.save() |
|
330 | 331 | |
|
331 | 332 | return user |
|
333 | ||
|
334 | ||
|
335 | def _redirect_to_next(request): | |
|
336 | next_page = request.GET['next'] | |
|
337 | return HttpResponseRedirect(next_page) |
@@ -199,4 +199,4 b' LAST_REPLIES_COUNT = 3' | |||
|
199 | 199 | ENABLE_CAPTCHA = False |
|
200 | 200 | # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown |
|
201 | 201 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds |
|
202 |
POSTING_DELAY = |
|
|
202 | POSTING_DELAY = 30 # seconds No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now