Skip to main content

Simple Python-Tabulate mixin for Django QuerySets.

Project description

=====
Django Tabulate
=====

Django Tabulate is a simple Django app on top of Python tabulate, but for querysets.

Quick start
-----------

1. Install django-tabulate from pip::

pip install django-tabulate

2. Lets your QuerySet Inherit from `TabulateMixin` or `TabulateQuerySet`:

from django_tabulate import TabulateMixin

class MyQuerySet(TabulateMixin, models.QuerySet):
#...

class MyModel(models.Model):
#...

objects = MyQuerySet.as_manager()
#if we have a manager, then
objects = MyManager.from_queryset(MyQuerySet)()

4. Start the python shell

python manage.py shell

5. Tabulate a QuerySet

from myapp.models import MyModel
print MyModel.objects.all().tabulate()

Project details


Download files

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

Files for django-tabulate, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django-tabulate-0.1.zip (7.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page