Add registry and cleanup files

This commit is contained in:
Roberto Rosario
2012-10-05 03:04:32 -04:00
parent d2f1490516
commit 065bfd9136
24 changed files with 218 additions and 0 deletions

10
apps/documents/cleanup.py Normal file
View File

@@ -0,0 +1,10 @@
from __future__ import absolute_import
from .models import Document, DocumentType
def cleanup():
for document in Document.objects.all():
document.delete()
DocumentType.objects.all().delete()

View File

@@ -0,0 +1,13 @@
from __future__ import absolute_import
from .cleanup import cleanup
bootstrap_models = [
{
'name': 'documenttype',
},
{
'name': 'documenttypefilename',
}
]
cleanup_functions = [cleanup]