Commit 186fbc91 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added student method to count up when they're flagged

parent fec2d235
......@@ -185,6 +185,10 @@ class Student(TimeStampedModel):
def get_absolute_url(self):
return reverse('detail_student', kwargs={'slug': self.slug})
def get_flag_count(self):
my_flag_num = Confirmation.objects.filter(student=self, lives_there=False).count()
return my_flag_num
class Meta:
ordering = ['user']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment