--- a/utils.py Thu Sep 17 15:52:46 2009 +0200
+++ b/utils.py Tue Sep 22 12:11:12 2009 +0200
@@ -10,15 +10,18 @@
from logilab.mtconverter import xml_escape
import locale
+import sys
+import decimal
+import datetime as pydatetime
from md5 import md5
-import sys
-import datetime as pydatetime
from datetime import datetime, timedelta, date
from time import time, mktime
from random import randint, seed
from calendar import monthrange
import decimal
+import simplejson
+
# initialize random seed from current time
seed()
try:
@@ -116,7 +119,10 @@
else:
from uuid import uuid4
def make_uid(key):
- return str(key) + str(uuid4())
+ # remove dash, generated uid are used as identifier sometimes (sql table
+ # names at least)
+ return str(key) + str(uuid4()).replace('-', '')
+
def dump_class(cls, clsname):
"""create copy of a class by creating an empty class inheriting