[Answered ]-Override model __init__ for an attribute which gets its value from running a method using another attribute as an argument

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
👤Rohan

Leave a comment