Exemple #1
0
def display_main_page(request):
    events = Event.future.get_n(5)
    changes = WikiChange.objects.order_by('-updated')[:5]
    projects = Project.all.order_by('-created_at')[:5]
    randommembers = list(get_active_members().exclude(contactinfo__image="").order_by('?')[:7])

    context = custom_settings_main(request)
    context.update(
        {'event_error_id': ' ',
        'latestevents': events,
        'latestchanges': changes,
        'latestprojects': projects,
        'randommembers': randommembers}
    )
    return render(request, 'index.html', context)
Exemple #2
0
def display_cellardoor(request):
    context = custom_settings_main(request)
    context['latestevents'] = Event.future.all()
    return render(request, 'cellardoor.html', context)