示例#1
0
文件: test.py 项目: strogo/djpcms
 def makesite(self):
     '''Setup the site'''
     appurls = getattr(self,'appurls',None)
     sites.clear()
     sett = sites.settings
     return sites.make(sett.SITE_DIRECTORY,
                       'conf',
                       route = self.urlbase,
                       APPLICATION_URL_MODULE = appurls)
示例#2
0
文件: test.py 项目: strogo/djpcms
 def clear(self, db = False):
     '''If db is set to True it clears the database pages'''
     if db:
         self.Page.objects.all().delete()
     else:
         sites.clear()