Monday 15 July 2013

django - Check if field is in abstract model class -


How can I check that the model field is in the abstract model?

I want to write the custom model_to_dict function, which gives only the area of ​​the abstracet model, not the corresponding model.

So I want to exclude every field that is not in the abstract model, is it possible?

you can try

  hatter (abstraktmodel, 'atri_name 1 ')   

If it returns true then its model

No comments:

Post a Comment