Skip to content

Instantly share code, notes, and snippets.

@audreyfeldroy
Created March 17, 2011 01:00
Show Gist options
  • Save audreyfeldroy/873662 to your computer and use it in GitHub Desktop.
Save audreyfeldroy/873662 to your computer and use it in GitHub Desktop.
from account.models import Account
l = Account.objects.all()
l = list(l)
l
lsqlite = Account.objects.using('sqlite').all()
lsqlite = list(lsqlite)
lsqlite
spostgres = set((c.app_label, c.model) for c in l)
ssqlite = set((c.app_label, c.model) for c in lsqlite)
ssqlite - spostgres
ct = ContentType.objects.using('sqlite').get(app_label='account', model='account')
ct.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment