Skip to content

Instantly share code, notes, and snippets.

View mistalaba's full-sized avatar

Martin Kjellberg mistalaba

  • Sweden/Denmark
View GitHub Profile
@wfehr
wfehr / migration_filer_deprecation_move.py
Created April 30, 2018 15:54
Migration to move deprecated cmsplugin-*-plugins to the newer djangocms-*-plugins
from django.apps import apps as global_apps
from django.db import migrations
from djangocms_file.models import get_templates as get_file_templates
from djangocms_picture.models import get_templates as get_picture_templates
def forwards_filer_file(apps, schema_editor):
try:
CMSPluginFilerFile = apps.get_model('cmsplugin_filer_file',
'FilerFile')