# Path: django_eventstream/eventstream.py
# def get_current_event_id(channels):
# 	storage = get_storage()
# 
# 	if not storage:
# 		raise ValueError('get_current_event_id requires storage to be enabled')
# 
# 	cur_ids = {}
# 	for channel in channels:
# 		cur_ids[channel] = str(storage.get_current_id(channel))
# 
# 	return make_id(cur_ids)


from django.shortcuts import render
from django_eventstream import get_current_event_id


def home(request):
    context = {}
    context['url'] = '/events/'
    context['last_id'] = get_current_event_id(['time'])

# Path: django_eventstream/eventstream.py
# def get_current_event_id(channels):
# 	storage = get_storage()
# 
# 	if not storage:
# 		raise ValueError('get_current_event_id requires storage to be enabled')
# 
# 	cur_ids = {}
# 	for channel in channels:
# 		cur_ids[channel] = str(storage.get_current_id(channel))
# 
# 	return make_id(cur_ids)


# Path: examples/time/timeapp/views.py
from django.shortcuts import render
from django_eventstream import get_current_event_id



def home(request):
    context = {}
    context['url'] = '/events/'
    context['last_id'] = get_current_event_id(['time'])

    return render(request, 'timeapp/home.html', context)