Commit 9adb7d0d2f51667cc6fe7e6e361b17a744724d92

Authored by Sergio Oliveira
1 parent 54b17af7

Adding views to count user contribution

Showing 1 changed file with 18 additions and 0 deletions   Show diff stats
src/proxy/models.py
... ... @@ -130,3 +130,21 @@ class Wiki(models.Model, HitCounterModelMixin):
130 130 return User.objects.get(username=self.modified_by)
131 131 except User.DoesNotExist:
132 132 return None
  133 +
  134 +
  135 +class WikiCollabCount(models.Model):
  136 + author = models.TextField(primary_key=True)
  137 + count = models.IntegerField()
  138 +
  139 + class Meta:
  140 + managed = False
  141 + db_table = 'wiki_collab_count_view'
  142 +
  143 +
  144 +class TicketCollabCount(models.Model):
  145 + author = models.TextField(primary_key=True)
  146 + count = models.IntegerField()
  147 +
  148 + class Meta:
  149 + managed = False
  150 + db_table = 'ticket_collab_count_view'
... ...