Creating Tables
Zango's app development platform empowers developers to seamlessly create tables that integrate with the underlying models. This guide details the step-by-step process of constructing and configuring tables using the platform's features and functionalities.
Import Table dependencies
Start by importing ModelTable, ModelCol from the table package and the Datamodel of your choice as shown below:
from ..packages.crud.table.base import ModelTable
from ..packages.crud.table.column import ModelCol
from .models import Patient
Creating table class
Begin structuring the data presentation by crafting a YourModelTable class. This class serves as the backbone for data representation and interaction, facilitating the organization and management of information in a tabular format. This would act as a foundation for subsequent CRUD operations.
class PatientTable(ModelTable)
Mapping table model
Leverage the Meta class within YourModelTable to customize the data model and field-specific configurations. This section empowers a nuanced control over data presentation and manipulation within the table interface.
class Meta:
model = Patient # Replace with your actual model