Skip to content

Commit

Permalink
parameterize Source class used in activitystreams.Handler
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Jul 22, 2012
1 parent e4ea68b commit d19eb62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion activitystreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ class Handler(webapp2.RequestHandler):

def __init__(self, *args, **kwargs):
super(Handler, self).__init__(*args, **kwargs)
self.source = SOURCE(self)
self.source = self.source_class()(self)

def source_class(self):
"""Return the Source subclass to use. May be overridden by subclasses."""
return SOURCE

def get(self):
"""Handles an API GET.
Expand Down

0 comments on commit d19eb62

Please sign in to comment.