Show More
@@ -50,7 +50,7 b'' | |||||
50 | {% if user.is_moderator %} |
|
50 | {% if user.is_moderator %} | |
51 | <span class="moderator_info"> |
|
51 | <span class="moderator_info"> | |
52 | ({{ thread.poster_ip }}) |
|
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 | >{% trans 'Delete' %}</a>] |
|
54 | >{% trans 'Delete' %}</a>] | |
55 | </span> |
|
55 | </span> | |
56 | {% endif %} |
|
56 | {% endif %} |
@@ -1,5 +1,6 b'' | |||||
1 | import hashlib |
|
1 | import hashlib | |
2 | from django.core.urlresolvers import reverse |
|
2 | from django.core.urlresolvers import reverse | |
|
3 | from django.http import HttpResponseRedirect | |||
3 | from django.template import RequestContext |
|
4 | from django.template import RequestContext | |
4 | from django.shortcuts import render, redirect, get_object_or_404 |
|
5 | from django.shortcuts import render, redirect, get_object_or_404 | |
5 | from django.utils import timezone |
|
6 | from django.utils import timezone | |
@@ -232,7 +233,7 b' def delete(request, post_id):' | |||||
232 | Post.objects.delete_post(post) |
|
233 | Post.objects.delete_post(post) | |
233 |
|
234 | |||
234 | if NO_PARENT == post.parent: |
|
235 | if NO_PARENT == post.parent: | |
235 |
return redirect( |
|
236 | return _redirect_to_next(request) | |
236 | else: |
|
237 | else: | |
237 | return redirect(thread, post_id=post.parent) |
|
238 | return redirect(thread, post_id=post.parent) | |
238 |
|
239 | |||
@@ -329,3 +330,8 b' def _get_user(request):' | |||||
329 | user.save() |
|
330 | user.save() | |
330 |
|
331 | |||
331 | return user |
|
332 | return user | |
|
333 | ||||
|
334 | ||||
|
335 | def _redirect_to_next(request): | |||
|
336 | next_page = request.GET['next'] | |||
|
337 | return HttpResponseRedirect(next_page) |
@@ -181,8 +181,8 b' MARKUP_FIELD_TYPES = (' | |||||
181 | ('markdown', markdown_extended), |
|
181 | ('markdown', markdown_extended), | |
182 | ) |
|
182 | ) | |
183 | # Custom imageboard settings |
|
183 | # Custom imageboard settings | |
184 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit |
|
184 | MAX_POSTS_PER_THREAD = 10 # Thread bumplimit | |
185 | MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count |
|
185 | MAX_THREAD_COUNT = 500 # Old threads will be deleted to preserve this count | |
186 | THREADS_PER_PAGE = 10 |
|
186 | THREADS_PER_PAGE = 10 | |
187 | SITE_NAME = 'Neboard' |
|
187 | SITE_NAME = 'Neboard' | |
188 |
|
188 | |||
@@ -199,4 +199,4 b' LAST_REPLIES_COUNT = 3' | |||||
199 | ENABLE_CAPTCHA = False |
|
199 | ENABLE_CAPTCHA = False | |
200 | # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown |
|
200 | # if user tries to post before CAPTCHA_DEFAULT_SAFE_TIME. Captcha will be shown | |
201 | CAPTCHA_DEFAULT_SAFE_TIME = 30 # seconds |
|
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