# Path: fossevents/events/services.py
# def get_public_event_listings(search_term=None):
# def get_chronologically_sorted_events():
# def get_event_review_url(event):
# def send_event_create_mail(event, users_emails):
# def send_event_update_mail(event, users_emails):
# def send_event_review_mail(review, moderator):
# def send_confirmation_mail(event, is_update=False):
# def create_event_review(moderator, event, data):
# def update_event_visibility(review):


from django.shortcuts import render
from fossevents.events import services as event_services
# -*- coding: utf-8 -*



def homepage(request):
    search_term = request.GET.get('q', None)
    upcoming_events = past_events = list()
    if not search_term:
        upcoming_events, past_events = event_services.get_chronologically_sorted_events()
    ctx = {

# Path: fossevents/events/services.py
# def get_public_event_listings(search_term=None):
# def get_chronologically_sorted_events():
# def get_event_review_url(event):
# def send_event_create_mail(event, users_emails):
# def send_event_update_mail(event, users_emails):
# def send_event_review_mail(review, moderator):
# def send_confirmation_mail(event, is_update=False):
# def create_event_review(moderator, event, data):
# def update_event_visibility(review):


# Path: fossevents/views.py
from django.shortcuts import render
from fossevents.events import services as event_services

# -*- coding: utf-8 -*



def homepage(request):
    search_term = request.GET.get('q', None)
    upcoming_events = past_events = list()
    if not search_term:
        upcoming_events, past_events = event_services.get_chronologically_sorted_events()
    ctx = {

        'events': event_services.get_public_event_listings(search_term=search_term) if search_term else [],