In order to not worry about long usernames when deleting objects, just rename fields to include the date

and include the name/description in the new description when deleting objects.

Also updated deletion script to understand that.
This commit is contained in:
Michael DeHaan
2013-07-27 18:55:42 -04:00
parent ac3ab82cc6
commit af43954ca8
2 changed files with 8 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ class Command(BaseCommand):
return
qs = model.objects.filter(**{
active_field: False,
'%s__startswith' % name_field: '_deleted_',
'%s__startswith' % name_field: '_d',
})
self.logger.debug('cleaning up model %s', model)
for instance in qs: