예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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
예제 #4
0
    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