Package madrona :: Package simplefaq :: Module models
[hide private]

Source Code for Module madrona.simplefaq.models

 1  from django.contrib.gis.db import models 
 2   
 3   
4 -class FaqGroup(models.Model):
5
6 - def __unicode__(self):
7 return u"%s" % (self.faq_group_name)
8 9 IMPORTANCE_CHOICES = ( 10 (1,'1'), 11 (2,'2'), 12 (3,'3'), 13 (4,'4'), 14 (5,'5'), 15 (6,'6'), 16 (7,'7'), 17 (8,'8'), 18 (9,'9'), 19 (10,'10') 20 ) 21 22 faq_group_name = models.CharField(max_length=50) 23 importance = models.IntegerField(choices=IMPORTANCE_CHOICES, blank=True, null=True)
24
25 -class Faq(models.Model):
26
27 - def __unicode__(self):
28 return u"%s" % (self.id)
29 30 IMPORTANCE_CHOICES = ( 31 (1,'1'), 32 (2,'2'), 33 (3,'3'), 34 (4,'4'), 35 (5,'5'), 36 (6,'6'), 37 (7,'7'), 38 (8,'8'), 39 (9,'9'), 40 (10,'10') 41 ) 42 43 question = models.TextField(max_length=200) 44 answer = models.TextField(max_length=2000) 45 importance = models.IntegerField(choices=IMPORTANCE_CHOICES) 46 faq_group = models.ForeignKey(FaqGroup)
47