def setUp(self): setup_demo() from django.db import connection, transaction cursor = connection.cursor() # Data modifying operation - commit required cursor.execute(ledger_account_view_sql) transaction.commit_unless_managed()
def clean_minibooks_db(): for g in Group.objects.all(): g.delete() for u in User.objects.all(): u.delete() for b in crm_models.Business.objects.all(): b.delete() for p in crm_models.Project.objects.all(): p.delete() demo.setup_demo()
def handle(self, **options): setup_demo()