comparison downloads/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 41d0389fc85a
comparison
equal deleted inserted replaced
678:38a198ea8c61 679:89b240fe9297
1 """ 1 """
2 Views for the downloads application. 2 Views for the downloads application.
3 """ 3 """
4 import random 4 import json
5 5
6 from django.shortcuts import render_to_response, get_object_or_404 6 from django.shortcuts import render_to_response, get_object_or_404
7 from django.template import RequestContext 7 from django.template import RequestContext
8 from django.contrib.auth.decorators import login_required 8 from django.contrib.auth.decorators import login_required
9 from django.http import Http404 9 from django.http import Http404
12 from django.http import HttpResponseForbidden 12 from django.http import HttpResponseForbidden
13 from django.http import HttpResponseBadRequest 13 from django.http import HttpResponseBadRequest
14 from django.http import HttpResponseNotFound 14 from django.http import HttpResponseNotFound
15 from django.core.paginator import InvalidPage 15 from django.core.paginator import InvalidPage
16 from django.core.urlresolvers import reverse 16 from django.core.urlresolvers import reverse
17 from django.db.models import Q
18 from django.views.decorators.http import require_POST 17 from django.views.decorators.http import require_POST
19 import django.utils.simplejson as json
20 18
21 from core.paginator import DiggPaginator 19 from core.paginator import DiggPaginator
22 from core.functions import email_admins 20 from core.functions import email_admins
23 from core.functions import get_page 21 from core.functions import get_page
24 from downloads.models import Category 22 from downloads.models import Category