# Path: django_eventstream/event.py
# class Event(object):
# 	def __init__(self, channel, type, data, id=None):
# 		self.channel = channel
# 		self.type = type
# 		self.data = data
# 		self.id = id


import sys
import json
import datetime
from django.utils import timezone
from django.core.serializers.json import DjangoJSONEncoder
from .event import Event
		from . import models
		from . import models
		from . import models
		from . import models

is_python3 = sys.version_info >= (3,)

# minutes before purging an event from the database
EVENT_TIMEOUT = 60 * 24

# attempt to trim this many events per pass
EVENT_TRIM_BATCH = 50

class EventDoesNotExist(Exception):
	def __init__(self, message, current_id):
		super(Exception, self).__init__(message)
		self.current_id = current_id

class StorageBase(object):
	def append_event(self, channel, event_type, data):
		raise NotImplementedError()

	def get_events(self, channel, last_id, limit=100):
		raise NotImplementedError()

	def get_current_id(self, channel):
		raise NotImplementedError()

class DjangoModelStorage(StorageBase):
	def append_event(self, channel, event_type, data):


# Path: django_eventstream/event.py
# class Event(object):
# 	def __init__(self, channel, type, data, id=None):
# 		self.channel = channel
# 		self.type = type
# 		self.data = data
# 		self.id = id


# Path: django_eventstream/storage.py
import sys
import json
import datetime
from django.utils import timezone
from django.core.serializers.json import DjangoJSONEncoder
from .event import Event
		from . import models
		from . import models
		from . import models
		from . import models


is_python3 = sys.version_info >= (3,)

# minutes before purging an event from the database
EVENT_TIMEOUT = 60 * 24

# attempt to trim this many events per pass
EVENT_TRIM_BATCH = 50

class EventDoesNotExist(Exception):
	def __init__(self, message, current_id):
		super(Exception, self).__init__(message)
		self.current_id = current_id

class StorageBase(object):
	def append_event(self, channel, event_type, data):
		raise NotImplementedError()

	def get_events(self, channel, last_id, limit=100):
		raise NotImplementedError()

	def get_current_id(self, channel):
		raise NotImplementedError()

class DjangoModelStorage(StorageBase):
	def append_event(self, channel, event_type, data):


		db_event = models.Event(