Example #1
0
 def init_help(self):
     help = SiteCommand.init_help(self)
     help["command_detail"] = (
         t("\n\nThe command %s will convert a site from dev to prod and vice versa.") % self.NAME
     )
     help["param_detail"] = t(
         "\n\ttodev: All occurences of www.yoursite.com will be replaced by dev.www.yoursite.com in files and in the database."
     )
     help["param_detail"] += t(
         "\n\ttoprod: All occurences of dev.www.yoursite.com will be replaced by www.yoursite.com in files and in the database."
     )
     help["param_detail"] += t(
         "\n\tfixpath: All occurences of /var/www/www.yoursite.com/www will be replaced by /var/www/www-yoursite-com/webroot in files and in the database."
     )
     return help
Example #2
0
 def do(self, args=[]):
     completed = SiteCommand.do(self, args)
     if not completed and len(args) == 0:
         self.print_unsupported(args)
     if not completed:
         if "todev" in args:
             completed = self.to_dev(args)
         elif "toprod" in args:
             completed = self.to_prod(args)
         elif "fixpath" in args:
             completed = self.fix_path(args)
         elif "devconv" in args:
             completed = self.devconv(args)
         elif "test" in args:
             completed = self.test(args)
         else:
             self.print_unsupported(args)
     return completed
Example #3
0
 def do(self, args=[]):
     completed = SiteCommand.do(self,args)
     if not completed:
         if self.__class__ == SiteCreateCommand:
             self.print_unsupported(args)
     return completed
Example #4
0
 def __init__(self):
     SiteCommand.__init__(self)
Example #5
0
 def __init__(self):
     SiteCommand.__init__(self)
     self.add_param("todev")
     self.add_param("toprod")
     self.add_param("fixpath")