Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

from django.contrib.gis.db import models 

 

 

class FaqGroup(models.Model): 

 

    def __unicode__(self): 

        return u"%s" % (self.faq_group_name) 

 

    IMPORTANCE_CHOICES = ( 

        (1,'1'), 

        (2,'2'), 

        (3,'3'), 

        (4,'4'), 

        (5,'5'), 

        (6,'6'), 

        (7,'7'), 

        (8,'8'), 

        (9,'9'), 

        (10,'10') 

    ) 

 

    faq_group_name = models.CharField(max_length=50) 

    importance = models.IntegerField(choices=IMPORTANCE_CHOICES, blank=True, null=True) 

 

class Faq(models.Model): 

 

    def __unicode__(self): 

        return u"%s" % (self.id) 

 

    IMPORTANCE_CHOICES = ( 

        (1,'1'), 

        (2,'2'), 

        (3,'3'), 

        (4,'4'), 

        (5,'5'), 

        (6,'6'), 

        (7,'7'), 

        (8,'8'), 

        (9,'9'), 

        (10,'10') 

    ) 

 

    question = models.TextField(max_length=200) 

    answer = models.TextField(max_length=2000) 

    importance = models.IntegerField(choices=IMPORTANCE_CHOICES) 

    faq_group = models.ForeignKey(FaqGroup)