def home(request): client = get_redis() return render(request, "home.html", { "space_open": space_is_open(client), "message": FlatPage.objects.filter(url="/message/").first(), "events": Event.objects.filter(stop__gt=datetime.now(), status__exact="r"), })
def home(request): client = get_redis() stream = [] if request.user.is_authenticated(): STREAM_SIZE = 20 stream = Action.objects.filter(public=True).prefetch_related('target', 'actor', 'action_object')[:STREAM_SIZE*2] stream = feed_reducer(stream)[:STREAM_SIZE] return render(request, "home.html", { "space_open": space_is_open(client), "message": FlatPage.objects.filter(url="/message/").first(), "events": Event.objects.filter(stop__gt=datetime.now(), status__exact="r"), "stream": stream, })
def home(request): client = get_redis() stream = [] if request.user.is_authenticated(): STREAM_SIZE = 20 # NOQA stream = Action.objects.filter(public=True).prefetch_related('target', 'actor', 'action_object')[:STREAM_SIZE * 2] stream = feed_reducer(stream)[:STREAM_SIZE] return render(request, "home.html", { "space_open": space_is_open(client), "message": dyn_config.HOMEPAGE_MESSAGE, "message_type": dyn_config.HOMEPAGE_MESSAGE_TYPE, "events": Event.objects.filter(stop__gt=datetime.now(), status__exact="r"), "stream": stream, "event_page": False, })
def home(request): client = get_redis() stream = [] if request.user.is_authenticated(): STREAM_SIZE = 20 # NOQA stream = Action.objects.filter(public=True).prefetch_related( 'target', 'actor', 'action_object')[:STREAM_SIZE * 2] stream = feed_reducer(stream)[:STREAM_SIZE] return render( request, "home.html", { "space_open": space_is_open(client), "message": FlatPage.objects.filter(url="/message/").first(), "events": Event.objects.filter(stop__gt=datetime.now(), status__exact="r"), "stream": stream, })
def home(request): client = get_redis() return render(request, "home.html", { "space_open": space_is_open(client), "message": FlatPage.objects.filter(url="/message/").first() })
def state(request): client = get_redis() return { "space_open": space_is_open(client), }