2016-05-11 20:19:19 +08:00
|
|
|
import datetime
|
2015-08-22 09:39:33 +08:00
|
|
|
import re
|
|
|
|
|
|
|
|
COMPILED_REGEX_TYPE = type(re.compile(''))
|
|
|
|
|
|
|
|
|
2017-01-19 15:39:46 +08:00
|
|
|
class RegexObject:
|
2015-08-22 09:39:33 +08:00
|
|
|
def __init__(self, obj):
|
|
|
|
self.pattern = obj.pattern
|
|
|
|
self.flags = obj.flags
|
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
return self.pattern == other.pattern and self.flags == other.flags
|
2016-05-11 20:19:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
def get_migration_name_timestamp():
|
|
|
|
return datetime.datetime.now().strftime("%Y%m%d_%H%M")
|