(str)
| 177 | add_data(db, table, getattr(module, table)) |
| 178 | |
| 179 | def make_id(str): |
| 180 | identifier_chars = string.ascii_letters + string.digits + "._" |
| 181 | str = "".join([c if c in identifier_chars else "_" for c in str]) |
| 182 | if str[0] in (string.digits + "."): |
| 183 | str = "_" + str |
| 184 | assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str |
| 185 | return str |
| 186 | |
| 187 | def gen_uuid(): |
| 188 | return "{"+UuidCreate().upper()+"}" |