I have designed the the table with the table2.is the screen shot of my table as shown below:
This row of each column are read only i.e. screenshot.I want the row of each column should be editable.Can we have the "edittext" as column of each row in the table2 in django?
Below is my model.py
from django.db import models
class Person(models.Model):
date = models.CharField(verbose_name="Date",max_length=255)
project = models.CharField(verbose_name="Project",max_length=255)
release = models.CharField(verbose_name="Release",max_length=255)
feature = models.CharField(verbose_name="Feature",max_length=255)
module_name = models.CharField(verbose_name="Module Name",max_length=255)
hours_spent = models.CharField(verbose_name="Hours spent",max_length=255)
comment = models.CharField(verbose_name="Comment",max_length=255)
Below is the table.py.
import django_tables2 as tables
from .models import Person
class PersonTable(tables.Table):
class Meta:
model = Person
# add class="paleblue" to <table> tag
attrs = {'class': 'paleblue'}
#fields = ('name') # fields to display
How should I edit my model.py,table.py? Please help.