django-model-ident provides a quick lookup for django models by pk only. Instead of writing ModelName.objects.get(pk=pk) write ModelName.ident_(pk)
The project can be found at https://github.com/ckirby/django-model-ident
- Django 1.11+
- Python 3.4+
pip install django-model-ident
Add 'model-ident' to your INSTALLED_APPS
On ready() django-model-ident monkey patches all the models found in your INSTALLED_APPS with the method ident_(pk). This calls <model>._base_manager.get(pk=pk). We use _base_manager so as not to get confused by changes in ModelManagers.