Commits

zuroc committed 9c1028c

f

  • Participants
  • Parent commits dcb8bfc

Comments (0)

Files changed (3)

File .app/sns/model/chip.py

     _host_dict = host_dict(user_id_list)
     result = []
     for rid in po_id_list:
-        link = '/po/%s'%rid
+        link = '/%s'%rid
         po = po_dict[rid]
         if po and po.name:
             name = po.name

File misc/backup/vps/mysql.sql

   `bandwidth` float unsigned DEFAULT '0',
   `time_end` bigint(20) unsigned DEFAULT '0',
   `extra_ips` int(10) unsigned NOT NULL DEFAULT '0',
+  `is_demo` tinyint(4) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
   KEY `user_id` (`user_id`),
   KEY `state` (`state_`),
   PRIMARY KEY (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
+DROP TABLE IF EXISTS `VmDemo`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `VmDemo` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `user_id` bigint(20) NOT NULL,
+  `data_center_id` bigint(20) NOT NULL,
+  `vm_id` bigint(20) DEFAULT NULL,
+  `idcard` varchar(50) DEFAULT NULL,
+  `usage` varchar(1024) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
 DROP TABLE IF EXISTS `VmDomain`;
 /*!40101 SET @saved_cs_client     = @@character_set_client */;
 /*!40101 SET character_set_client = utf8 */;
   `migrate_speed` int(11) unsigned DEFAULT NULL,
   `is_full` tinyint(1) NOT NULL DEFAULT '0',
   `country_id` bigint(20) NOT NULL,
+  `can_try` tinyint(4) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 /*!40101 SET character_set_client = @saved_cs_client */;
   `vps_limit` int(11) NOT NULL,
   `host_type` int(11) NOT NULL COMMENT 'vps environment type',
   `alloc_bitmap` int(11) DEFAULT '0',
-  `txt` text,
   PRIMARY KEY (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='物理机';
 /*!40101 SET character_set_client = @saved_cs_client */;

File replace_line.py

 
     for dirpath, dirnames, filenames in walk(dirname(file)):
         dirbase = basename(dirpath)
-        if dirbase.startswith('.'):
+        if dirbase.startswith('.') or "/.hg/" in dirpath:
             continue
 
         for filename in filenames:
-            suffix = filename.rsplit('.', 1)[-1]
+            _suffix = filename.rsplit('.', 1)[-1]
             # if suffix not in ('css','html', 'htm', ):
-            if suffix not in suffix:
+            if _suffix not in suffix:
                 continue
             path = join(dirpath, filename)
             if path == file: