##// END OF EJS Templates
Fixed post deletion and export to JSON
Fixed post deletion and export to JSON

File last commit:

r1590:0eb7ac3c default
r1603:0695b6a9 default
Show More
random.py
22 lines | 455 B | text/x-python | PythonLexer
from django.shortcuts import render
from django.views.generic import View
from boards.models import Attachment
__author__ = 'neko259'
TEMPLATE = 'boards/random.html'
CONTEXT_IMAGES = 'images'
RANDOM_POST_COUNT = 9
class RandomImageView(View):
def get(self, request):
params = dict()
params[CONTEXT_IMAGES] = Attachment.objects.get_random_images(
RANDOM_POST_COUNT)
return render(request, TEMPLATE, params)