def add_keys(apps, schema_editor):
    """
    We can't import the Post model directly as it may be a newer
    version than this migration expects. We use the historical version.
    """
    Setting = apps.get_model('settings', 'Setting')
    key = ''
    try:
        key = 'COURSE_IGNORE_IN_LIST_IDS'
        Setting.objects.get(key=key)
    except Exception:
        Setting.objects.create(title='دوره هایی که در لیست نمی آیند', key=
            key, value='', value_type='s', is_show=False,
            is_variable_in_home=True)
