2👍
✅
Instead of changing the __init__()
method, you can implement asked_online
as property of the class.
Example:
class Poll(models.Model):
#your fields
@property
def asked_online(self):
#check if self.question is asked using some method
return True # if asked online, else False
Source:stackexchange.com