Skip to content

Commit

Permalink
ModContribSR inherits from MultiReddit.
Browse files Browse the repository at this point in the history
Now has get_all_comments method.
  • Loading branch information
bsimpson63 authored and spladug committed Jun 26, 2012
1 parent 1969aee commit 91b7856
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions r2/r2/models/subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,6 @@ def sponsorship_text(self):
def sponsorship_img(self):
return self._base.sponsorship_img if self._base else ""



class MultiReddit(_DefaultSR):
name = 'multi'
header = ""
Expand Down Expand Up @@ -950,15 +948,14 @@ class RandomNSFWReddit(FakeSubreddit):
name = 'randnsfw'
header = ""

class ModContribSR(_DefaultSR):
class ModContribSR(MultiReddit):
name = None
title = None
query_param = None
real_path = None

@property
def path(self):
return '/r/' + self.real_path
def __init__(self):
MultiReddit.__init__(self, self.sr_ids, self.real_path)

@property
def sr_ids(self):
Expand All @@ -967,12 +964,10 @@ def sr_ids(self):
else:
return []

def rising_srs(self):
@property
def kept_sr_ids(self):
return self.sr_ids

def get_links(self, sort, time):
return self.get_links_sr_ids(self.sr_ids, sort, time)

class ModSR(ModContribSR):
name = "subreddits you moderate"
title = "subreddits you moderate"
Expand Down

0 comments on commit 91b7856

Please sign in to comment.