💂🏻 Django package that provides hints to optimize database usage by deferring unused fields (and more)
.. image:: https://badge.fury.io/py/django-eraserhead.svg :target: https://badge.fury.io/py/django-eraserhead
.. image:: https://travis-ci.org/dizballanze/django-eraserhead.svg?branch=master :target: https://travis-ci.org/dizballanze/django-eraserhead
.. image:: https://codecov.io/gh/dizballanze/django-eraserhead/branch/master/graph/badge.svg :target: https://codecov.io/gh/dizballanze/django-eraserhead
.. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg :target: https://saythanks.io/to/dizballanze
Provide hints to optimize database usage by deferring unused fields
.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/eraserhead.jpg
WARNING use this package only in dev environment!
Install Django Eraserhead::
pip install django-eraserhead
Add it to your INSTALLED_APPS
:
.. code-block:: python
INSTALLED_APPS = (
...
'eraserhead.apps.EraserheadConfig',
...
)
ERASERHEAD_ENABLED = True
ERASERHEAD_TRACEBACK_BASE_PATH = BASE_DIR
Settings:
ERASERHEAD_ENABLED
- enable/disable Django EraserheadERASERHEAD_TRACEBACK_BASE_PATH
- set base path to filter tracebacks. Set to None
to display full traceback... image:: https://github.com/dizballanze/django-eraserhead/raw/master/screenshot.png
Django Eraserhead monitors:
Based on fields usage Django Eraserhead suggests optimizations for each queryset.
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Tools used in rendering this package:
cookiecutter-djangopackage
_.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _cookiecutter-djangopackage
: https://github.com/pydanny/cookiecutter-djangopackage