Example of a longer filename:
- 3e12cdb9209d_alter_user_table_telephone_and_mobile_columns.py
Example of a filename that has been truncated:
- 12894284029g_create_partial_index_for_article_telephone_column_and_.py
return map_
def _rev_path(self, rev_id, message, create_date):
- slug = "_".join(_slug_re.findall(message or "")).lower()[0:20]
+ slug = "_".join(_slug_re.findall(message or "")).lower()
+ if len(slug) > 60:
+ slug = slug[:60].rsplit('_', 1)[0]+'_'
filename = "%s.py" % (
self.file_template % {
'rev': rev_id,
"I'd like it to\nhave\nnewlines")
assert os.access(
os.path.join(env.dir, 'versions',
- '%s_this_is_a_really_lon.py' % rid), os.F_OK)
+ '%s_this_is_a_really_long_name_with_lots_of_'
+ 'characters_and_also_.py' % rid), os.F_OK)
@classmethod