Show More
@@ -293,7 +293,7 class Post(models.Model, Viewable): | |||||
293 | """ |
|
293 | """ | |
294 |
|
294 | |||
295 | if format_type == DIFF_TYPE_HTML: |
|
295 | if format_type == DIFF_TYPE_HTML: | |
296 | if PARAMETER_TRUNCATED in request.GET: |
|
296 | if request is not None and PARAMETER_TRUNCATED in request.GET: | |
297 | truncated = True |
|
297 | truncated = True | |
298 | reply_link = False |
|
298 | reply_link = False | |
299 | else: |
|
299 | else: |
@@ -1,11 +1,9 | |||||
1 | from datetime import datetime |
|
|||
2 |
|
|
1 | import json | |
3 | import logging |
|
2 | import logging | |
|
3 | ||||
4 | from django.db import transaction |
|
4 | from django.db import transaction | |
5 | from django.http import HttpResponse |
|
5 | from django.http import HttpResponse | |
6 |
from django.shortcuts import get_object_or_404 |
|
6 | from django.shortcuts import get_object_or_404 | |
7 | from django.template import RequestContext |
|
|||
8 | from django.utils import timezone |
|
|||
9 | from django.core import serializers |
|
7 | from django.core import serializers | |
10 |
|
8 | |||
11 | from boards.forms import PostForm, PlainErrorList |
|
9 | from boards.forms import PostForm, PlainErrorList | |
@@ -14,6 +12,7 from boards.utils import datetime_to_epo | |||||
14 | from boards.views.thread import ThreadView |
|
12 | from boards.views.thread import ThreadView | |
15 | from boards.models.user import Notification |
|
13 | from boards.models.user import Notification | |
16 |
|
14 | |||
|
15 | ||||
17 | __author__ = 'neko259' |
|
16 | __author__ = 'neko259' | |
18 |
|
17 | |||
19 | PARAMETER_TRUNCATED = 'truncated' |
|
18 | PARAMETER_TRUNCATED = 'truncated' | |
@@ -215,7 +214,6 def api_get_notifications(request, usern | |||||
215 | return HttpResponse(content=json.dumps(json_post_list)) |
|
214 | return HttpResponse(content=json.dumps(json_post_list)) | |
216 |
|
215 | |||
217 |
|
216 | |||
218 |
|
||||
219 | def api_get_post(request, post_id): |
|
217 | def api_get_post(request, post_id): | |
220 | """ |
|
218 | """ | |
221 | Gets the JSON of a post. This can be |
|
219 | Gets the JSON of a post. This can be |
General Comments 0
You need to be logged in to leave comments.
Login now