.. _howto-datatable: ================= DataTable HowTo ================= Introduzione ------------ Questo howto mostra come configurare velocemente una :ref:`ref-datatable` Immaginiamo di avere i seguenti modelli:: class Person(models.Model): nome = models.CharField(max_length=100) cognome = models.CharField(max_length=100) class Phone(models.Model): owner = models.ForeignKey(Person) num = models.CharField(max_length=30) Creiamo la DataTable :: class PhoneDataTable(OfficeDetailTable): model = Phone list_display = ('owner', 'num') ... configuriamo le url di servizio:: ... (r'^phones/', include( PhoneDataTable.get_urls(Person) ) ), ...