##// END OF EJS Templates
Version bump
Version bump

File last commit:

r1590:0eb7ac3c default
r1687:76b11b97 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)