Skip to main content

Django app to provide classes quick pk only lookups

Project description

================== django-model-ident

.. image:: :target:

.. image:: :target:

.. image:: :target:

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


  • Django 1.11+
  • Python 3.4+


Add 'model-ident' to your INSTALLED_APPS

How Does It Work

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.

Project details

Release history Release notifications

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-model-ident, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size django_model_ident-0.2-py2.py3-none-any.whl (4.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size django-model-ident-0.2.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page