.
This commit is contained in:
+3
-1
@@ -15,6 +15,8 @@ class Entry(models.Model):
|
||||
|
||||
comments = models.TextField(blank=True)
|
||||
|
||||
inactive = models.BooleanField(default=False)
|
||||
|
||||
#format = models.ForeignKey('Formats', on_delete=models.CASCADE, null=True, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
@@ -64,7 +66,7 @@ class Formats(models.Model):
|
||||
return "\n".join(formats)
|
||||
|
||||
def get_entries(self):
|
||||
return Entry.objects.filter(questions__icontains=self.get_format())
|
||||
return Entry.objects.filter(questions__icontains=self.get_format(), inactive=False)
|
||||
|
||||
class Specialty(models.Model):
|
||||
name = models.CharField(max_length=200)
|
||||
|
||||
Reference in New Issue
Block a user