'Works out, from the current app, settings, and the command line options,
which apps should be frozen.'

def calc_frozen_apps(self, migrations, freeze_list):

    apps_to_freeze = []
    for to_freeze in freeze_list:
        if ('.' in to_freeze):
            self.error(("You    cannot    freeze    %r;    you    must    provide    an    app    label,    like    'auth'    or    'books'." % to_freeze))
        if (not models.get_app(to_freeze)):
            self.error(("You    cannot    freeze    %r;    it's    not    an    installed    app." % to_freeze))
        apps_to_freeze.append(to_freeze)
    if getattr(settings, 'SOUTH_AUTO_FREEZE_APP', True):
        apps_to_freeze.append(migrations.app_label())
    return apps_to_freeze
