##// END OF EJS Templates
Feed of posts for the specific IP (works only for moderators who can delete posts)
Feed of posts for the specific IP (works only for moderators who can delete posts)

File last commit:

r1590:0eb7ac3c default
r1641:d57d7e7e 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)