Will & Skill Developers

Will & Skill Developers


Thoughts, snippets and ideas from the team at Will & Skill AB, Stockholm.

Faisal Mahmud
Author

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

Share


How to get <APPNAME>.<MODELNAME> in Django

Faisal MahmudFaisal Mahmud
def get_model_app_name(object_):  
    return "{}.{}".format(object_.__module__.split('.')[0], object_.__class__.__name__)
Faisal Mahmud
Author

Faisal Mahmud

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

Comments