@receiver(post_migrate)
def sync_create_groups(sender, **kwargs):
 if (sender.label == u'accounts'):
  create_groups(False)

@ receiver ( post_migrate ) def sync_create_groups ( sender , ** kwargs ) : if ( sender . label == u'accounts' ) : create_groups ( False )
create groups on syncdb .