Volver al ranking

jieter/django-tables2

Pythondjango-tables2.readthedocs.io/en/latest/

django-tables2 - An app for creating HTML tables

djangopythontableviewtablessorting
Crecimiento de estrellas
Estrellas
2k
Forks
444
Crecimiento semanal
Issues
91
1k2k
mar 2011abr 2016jun 2021jul 2026
ArtefactosPyPIpip install django-tables2
README

django-tables2 - An app for creating HTML tables

Latest PyPI version Any color you like

django-tables2 simplifies the task of turning sets of data into HTML tables. It has native support for pagination and sorting. It does for HTML tables what django.forms does for HTML forms. e.g.

Features:

  • Any iterable can be a data-source, but special support for Django QuerySets is included.
  • The builtin UI does not rely on JavaScript.
  • Support for automatic table generation based on a Django model.
  • Supports custom column functionality via subclassing.
  • Pagination.
  • Column based table sorting.
  • Template tag to enable trivial rendering to HTML.
  • Generic view mixin.

An example table rendered using django-tables2

An example table rendered using django-tables2 and bootstrap theme

An example table rendered using django-tables2 and semantic-ui theme

Example

Start by adding django_tables2 to your INSTALLED_APPS setting like this:

INSTALLED_APPS = (
    ...,
    "django_tables2",
)

Creating a table for a model Simple is as simple as:

import django_tables2 as tables

class SimpleTable(tables.Table):
    class Meta:
        model = Simple

This would then be used in a view:

class TableView(tables.SingleTableView):
    table_class = SimpleTable
    queryset = Simple.objects.all()
    template_name = "simple_list.html"

And finally in the template:

{% load django_tables2 %}
{% render_table table %}

This example shows one of the simplest cases, but django-tables2 can do a lot more! Check out the documentation for more details.

Repositorios relacionados
django/django

The Web framework for perfectionists with deadlines.

PythonPyPIBSD 3-Clause "New" or "Revised" Licensepythondjango
djangoproject.com
88.2k34.1k
makeplane/plane

🔥🔥🔥 Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

TypeScriptnpmGNU Affero General Public License v3.0djangodocker
plane.so
54.8k5.1k
LeCoupa/awesome-cheatsheets

👩‍💻👨‍💻 Awesome cheatsheets for popular programming languages, frameworks and development tools. They include everything you should know in one single file.

JavaScriptnpmMIT Licensecheatsheetsjavascript
lecoupa.github.io/awesome-cheatsheets/
46.2k6.7k
getsentry/sentry

Developer-first error tracking and performance monitoring

PythonPyPIOthercrash-reportingcrash-reports
sentry.io
44.3k4.8k
paperless-ngx/paperless-ngx

A community-supported supercharged document management system: scan, index and archive all your documents

PythonPyPIGNU General Public License v3.0angulararchiving
docs.paperless-ngx.com
43.3k2.9k
jumpserver/jumpserver

JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

PythonPyPIGNU General Public License v3.0pythonssh-server
jumpserver.com
31.1k5.7k
encode/django-rest-framework

Web APIs for Django. 🎸

PythonPyPIOtherpythondjango
django-rest-framework.org
30.1k7.1k
netbox-community/netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/products/free-netbox-cloud/

PythonPyPIApache License 2.0dcimipam
netboxlabs.com/products/netbox/
21.2k3.1k
wagtail/wagtail

A Django content management system focused on flexibility and user experience

PythonPyPIBSD 3-Clause "New" or "Revised" Licensepythondjango
wagtail.org
20.4k4.6k
suitenumerique/docs

Docs is an open-source text editor: web-native, made for real-time collaboration, cleanly structured documents and sub-documents with full ownership of your data. Built to scale with Django and React.

PythonPyPIMIT Licenseknowledgewiki
docs.la-suite.eu
16.7k604
ansible/awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.

PythonPyPIOtherpythonansible
15.5k3.7k
cookiecutter/cookiecutter-django

Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

PythonPyPIBSD 3-Clause "New" or "Revised" Licensepythondjango
cookiecutter-django.readthedocs.io
13.6k3.1k