python - Multiple inheritance mixing ndb.Model with PolyModel in AppEngine -


in application using base model hold general properties, simple subclass of ndb.model. however, of functionality helpful able leverage polymodel functionality. both model , polymodel supposedly support multiple inheritance, question is, there caveats of doing below?

from google.appengine.ext import ndb google.appengine.ext.ndb import polymodel      class internalbase(ndb.model):    # fields, methods shared many sub-models  class widget(polymodel.polymodel, internalbase):    # widget-general  class textwidget(widget):    # widget-specific  class htmlwidget(widget):    # widget-specific 

the goal have basic properties , methods internalbase available widget class able search subclasses of widget using single query (which polymodel adds).

also, think of test-case expose potential problem such scheme?


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -