Skip to main content

Package description

Project description

Create dynamic tables with Angular using your Django Rest Framework API.

If you use Django Rest Framework, get a representation of your results dynamic and easy to use and extend. Features include:

  • Self-construction.
  • Pagination.
  • Filter by columns.
  • Sort by columns.
  • Change the field representation.

Basic usage

Create a table class including your Django Rest Framework (DRF) ViewSet:

# myapp/
# ------------
class MyTable(Table):
    class Meta:
        view_set = MymodelViewSet  # DRF ViewSet

Add it to your view context:

# myapp/
# --------------
def my_view(request):
    return render(request, 'myapp/mytable.html', {'table': MyTable()})

Add it to your template:

{# myapp/templates/myapp/mytable.html #}
{# ---------------------------------- #}

{% load rest_tables %}

{% rest_table table %}

<script src="//" type="text/javascript"></script>
<script src="//" type="text/javascript"></script>
<script src="{% static 'rest_tables/src/js/rest_tables.js' %}" type="text/javascript"></script>

It’s all!

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-rest-tables, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size django-rest-tables-0.1.0.tar.gz (6.9 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