Django: function get_model with a tuple
The django function get_model()
takes an app name and model, but I was curious as to whether you can us it with a tuple
i.e. something like
get_model(('app','model'))
Thanks, sorry if this is basi开发者_如何转开发c
Why not? it's python! Expand your tuple with *
get_model(*('app', 'model'))
精彩评论