glossary stuff
This commit is contained in:
parent
4f860154f4
commit
a80d465ad0
|
@ -216,9 +216,10 @@ class Guideline(ItfModel):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
|
||||||
class Glossary(models.Model):
|
class Glossary(ItfModel):
|
||||||
term = models.CharField(max_length=256)
|
term = models.CharField(max_length=256)
|
||||||
definition = models.TextField()
|
definition = models.TextField()
|
||||||
|
title_field = 'term'
|
||||||
|
|
||||||
def get_dict(self):
|
def get_dict(self):
|
||||||
return {
|
return {
|
||||||
|
@ -233,6 +234,9 @@ class Glossary(models.Model):
|
||||||
'definition': self.definition
|
'definition': self.definition
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def info_dict(self):
|
||||||
|
return self.list_dict()
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.term
|
return self.term
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ModuleTab(models.Model):
|
||||||
module = models.ForeignKey(Module)
|
module = models.ForeignKey(Module)
|
||||||
title = models.CharField(max_length=64, help_text="Display title for tab")
|
title = models.CharField(max_length=64, help_text="Display title for tab")
|
||||||
slug = models.SlugField(help_text="short name for tab, to be used in url, eg. faq")
|
slug = models.SlugField(help_text="short name for tab, to be used in url, eg. faq")
|
||||||
text = models.TextField(help_text="text to show up in LHS for tab")
|
text = models.TextField(help_text="text to show up in LHS for tab", blank=True)
|
||||||
model = models.ForeignKey("ModelExtra", help_text="Database model object tab is linked to (chose from list or ask for one to be created.)")
|
model = models.ForeignKey("ModelExtra", help_text="Database model object tab is linked to (chose from list or ask for one to be created.)")
|
||||||
is_default = models.BooleanField(default=False, help_text="Whether this should be the default displayed tab.")
|
is_default = models.BooleanField(default=False, help_text="Whether this should be the default displayed tab.")
|
||||||
order = models.IntegerField(default=1, help_text="Make number higher to send it lower in order (default will always show first)")
|
order = models.IntegerField(default=1, help_text="Make number higher to send it lower in order (default will always show first)")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user