def __init__(self, populate=True,big=False, withDemoData=True, withJokes=False, **kw): self.populate=populate self.big=big self.withDemoData=withDemoData self.withJokes=withJokes Pinboard.__init__(self,**kw)
def __init__(self, populate=True, big=False, withDemoData=True, withJokes=False, **kw): self.populate = populate self.big = big self.withDemoData = withDemoData self.withJokes = withJokes Pinboard.__init__(self, **kw)
def createContext(self): ctx=Pinboard.createContext(self) if self.populate: if self.withDemoData: self.runtask(DemoPopulator(),ctx) #ctx.populate(DemoPopulator(big=self.big)) else: self.runtask(StdPopulator(),ctx) #ctx.populate(StandardPopulator(big=self.big)) if self.withJokes: self.runtask(JokesPopulator(),ctx) return ctx
def createContext(self): ctx = Pinboard.createContext(self) if self.populate: if self.withDemoData: self.runtask(DemoPopulator(), ctx) #ctx.populate(DemoPopulator(big=self.big)) else: self.runtask(StdPopulator(), ctx) #ctx.populate(StandardPopulator(big=self.big)) if self.withJokes: self.runtask(JokesPopulator(), ctx) return ctx