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)
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()