| IITkaGyan v0.9 A platform for students to ask their doubts to IITians directly...

Public Member Functions | Static Public Attributes | List of all members
gyans.models.Answer Class Reference
Inheritance diagram for gyans.models.Answer:

## Public Member Functions
def | __str__ (self)

## Static Public Attributes
| author = models.CharField(max_length=100, null=True)
| question
| answer_text
| date_created = models.DateField(null=True, default=timezone.now())
| date_updated = models.DateField(null=True, default=timezone.now())
| upvote = models.IntegerField(default=0)
| downvote = models.IntegerField(default=0)
| views = models.IntegerField(default=0)

## Detailed Description

    Model representing an answer.

## Member Function Documentation

## ◆ __str__()

def gyans.models.Answer.__str__ | ( |  | self | ) |

    String for representing the Model object.

## Member Data Documentation

## ◆ answer_text

gyans.models.Answer.answer_text
| static

Initial value:
= models.TextField(
max_length=2000, help_text='Write your answer here...')

## ◆ author

gyans.models.Answer.author = models.CharField(max_length=100, null=True)
| static

## ◆ date_created

gyans.models.Answer.date_created = models.DateField(null=True, default=timezone.now())
| static

## ◆ date_updated

gyans.models.Answer.date_updated = models.DateField(null=True, default=timezone.now())
| static

## ◆ downvote

gyans.models.Answer.downvote = models.IntegerField(default=0)
| static

## ◆ question

gyans.models.Answer.question
| static

Initial value:
= models.ForeignKey(
'Question', on_delete=models.SET_NULL, null=True)

## ◆ upvote

gyans.models.Answer.upvote = models.IntegerField(default=0)
| static

## ◆ views

gyans.models.Answer.views = models.IntegerField(default=0)
| static

The documentation for this class was generated from the following file:

- IITKaGyan/gyans/models.py