I have made a Django project and designed a model with a field name in it what I write is :
name = models.CharField(max_length = 250)
Is there a way to print CharField on the screen, using command like
d = name.field()
and it stores a String in variable d as CharField.
If I ask it as attendance.field, I want it to show BooleanField as output. Like :
from django.db import models as data_type
class UserAttendance(data_type.Model):
user=data_type.ForeignKey(UserList,on_delete=data_type.CASCADE)
date=data_type.DateField()
attendance=data_type.BooleanField(default=False)
I searched but did not found anything that allowed to print CharField on screen. Can anyone suggest me how to do this ?