Mercurial > public > sg101
comparison messages/views.py @ 679:89b240fe9297
For Django 1.5.2: import json; django.utils.simplejson is deprecated.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 15 Aug 2013 20:14:33 -0500 |
parents | ee87ea74d46b |
children | 6bbd1473d48e |
comparison
equal
deleted
inserted
replaced
678:38a198ea8c61 | 679:89b240fe9297 |
---|---|
1 """ | 1 """ |
2 Views for the messages application. | 2 Views for the messages application. |
3 | 3 |
4 """ | 4 """ |
5 import datetime | 5 import datetime |
6 import json | |
6 | 7 |
7 from django.contrib.auth.decorators import login_required | 8 from django.contrib.auth.decorators import login_required |
8 from django.contrib.auth.models import User | 9 from django.contrib.auth.models import User |
9 from django.contrib import messages as django_messages | 10 from django.contrib import messages as django_messages |
10 from django.core.paginator import Paginator, EmptyPage, InvalidPage | 11 from django.core.paginator import Paginator, EmptyPage, InvalidPage |
12 from django.http import HttpResponse | 13 from django.http import HttpResponse |
13 from django.http import HttpResponseForbidden | 14 from django.http import HttpResponseForbidden |
14 from django.http import HttpResponseNotAllowed | 15 from django.http import HttpResponseNotAllowed |
15 from django.shortcuts import get_object_or_404 | 16 from django.shortcuts import get_object_or_404 |
16 from django.shortcuts import render | 17 from django.shortcuts import render |
17 import django.utils.simplejson as json | |
18 | 18 |
19 from messages.models import Message, Options | 19 from messages.models import Message, Options |
20 from messages.forms import OptionsForm, ComposeForm | 20 from messages.forms import OptionsForm, ComposeForm |
21 from messages.utils import reply_subject | 21 from messages.utils import reply_subject |
22 from messages import MSG_BOX_LIMIT | 22 from messages import MSG_BOX_LIMIT |