I have an attendance model using which I want to mark attendance of a list of users for a particular day. But I can't figure out how should I build the view that allows me to render a html table of users with their corresponding attendance form in one column of table in the template. My model for attendance:
class Attendance(models.Model):
ATTENDANCE_TYPES = (
('present', 'Present'),
('absent', 'Absent'),
)
date = models.DateField("Date")
author = models.ForeignKey(User,related_name='attendances_taken')
is_present = models.BooleanField(default='True')
student = models.ForeignKey(User,related_name='course_attendances')
classroom = models.ForeignKey(Classroom,related_name='student_attendance')