c9a89a67c6841224c80225359c8e88fe7dc320aa
[oweals/karmaworld.git] / karmaworld / apps / quizzes / models.py
1 #!/usr/bin/env python
2 # -*- coding:utf8 -*-
3 # Copyright (C) 2014  FinalsClub Foundation
4 import datetime
5 from django.db import models
6
7
8 class Keyword(models.Model):
9     word = models.CharField(max_length=1024)
10     definition = models.CharField(max_length=2048, blank=True, null=True)
11     note = models.ForeignKey('notes.Note', blank=True, null=True)
12     ranges = models.CharField(max_length=1024, blank=True, null=True)
13     timestamp = models.DateTimeField(default=datetime.datetime.utcnow)
14     unreviewed = models.BooleanField(default=False)
15
16     class Meta:
17         unique_together = ('word', 'note', 'ranges')
18
19     def __unicode__(self):
20         return self.word
21