@@ -0,0 +1,1206 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#from django.conf import settings%0A#from django.utils.importlib import import_module%0Afrom django.db import models%0Afrom django.utils.translation import ugettext_lazy as _%0A%0Afrom opps.core.models import Publishable, BaseBox%0A%0A%0A%22%22%22%0Afrom django.db.models import get_model%0Amodel = get_model('myapp', 'modelA')%0Amodel.objects.filter(**kwargs)%0A%0A(Pdb)  models.get_models()%5B15%5D._meta.local_fields%5B0%5D.verbose_name%0Au'ID'%0A(Pdb)  models.get_models()%5B15%5D._meta.local_fields%5B0%5D.name%0Au'id'%0A%22%22%22%0A%0Atry:%0A    OPPS_APPS = tuple(%5B(app._meta.app_label, u%22%7B0%7D - %7B1%7D%22.format(%0A        app._meta.app_label, app._meta.object_name))%0A        for app in models.get_models() if 'opps.' in app.__module__%5D)%0Aexcept ImportError:%0A    OPPS_APPS = tuple(%5B%5D)%0A%0A%0Aclass QuerySet(Publishable):%0A    name = models.CharField(_(u%22Dynamic queryset name%22), max_length=140)%0A    slug = models.SlugField(%0A        _(u%22Slug%22),%0A        db_index=True,%0A        max_length=150,%0A        unique=True,%0A    )%0A%0A    model = models.CharField(_(u'Model'), max_length=150, choices=OPPS_APPS)%0A%0A%0Aclass DynamicBox(BaseBox):%0A%0A    dynamicqueryset = models.ForeignKey(%0A        'boxes.QuerySet',%0A        verbose_name=_(u'Query Set')%0A    )%0A

Create dynamic box models