Commit bba379846140a407b16e1bbdd8327cf15e2fd53a

Authored by Thiago Ribeiro
Committed by Sergio Oliveira
1 parent 9ea6e605
Exists in trac_indexing

Changing class Meta to generate migrations.

Signed-off-by: Carolina Ramalho <carol15022@hotmail.com>
Showing 1 changed file with 27 additions and 8 deletions   Show diff stats
colab/proxy/trac/models.py
... ... @@ -8,6 +8,7 @@ from django.conf import settings
8 8 from hitcounter.models import HitCounterModelMixin
9 9  
10 10 from colab.accounts.models import User
  11 +from django.utils.translation import ugettext_lazy as _
11 12  
12 13  
13 14 class Attachment(models.Model, HitCounterModelMixin):
... ... @@ -22,8 +23,8 @@ class Attachment(models.Model, HitCounterModelMixin):
22 23 size = models.IntegerField(blank=True)
23 24  
24 25 class Meta:
25   - managed = False
26   - db_table = 'attachment_view'
  26 + verbose_name = _('Attachment')
  27 + verbose_name_plural = _('Attachment')
27 28  
28 29 @property
29 30 def filepath(self):
... ... @@ -53,8 +54,8 @@ class Revision(models.Model, HitCounterModelMixin):
53 54 created = models.DateTimeField(blank=True, null=True)
54 55  
55 56 class Meta:
56   - managed = False
57   - db_table = 'revision_view'
  57 + verbose_name = _('Attachment')
  58 + verbose_name_plural = _('Attachment')
58 59  
59 60 def get_absolute_url(self):
60 61 return u'/changeset/{}/{}'.format(self.rev, self.repository_name)
... ... @@ -85,8 +86,8 @@ class Ticket(models.Model, HitCounterModelMixin):
85 86 modified_by = models.TextField(blank=True)
86 87  
87 88 class Meta:
88   - managed = False
89   - db_table = 'ticket_view'
  89 + verbose_name = _('Attachment')
  90 + verbose_name_plural = _('Attachment')
90 91  
91 92 def get_absolute_url(self):
92 93 return u'/ticket/{}'.format(self.id)
... ... @@ -114,8 +115,8 @@ class Wiki(models.Model, HitCounterModelMixin):
114 115 modified_by = models.TextField(blank=True)
115 116  
116 117 class Meta:
117   - managed = False
118   - db_table = 'wiki_view'
  118 + verbose_name = _('Attachment')
  119 + verbose_name_plural = _('Attachment')
119 120  
120 121 def get_absolute_url(self):
121 122 return u'/wiki/{}'.format(self.name)
... ... @@ -131,3 +132,21 @@ class Wiki(models.Model, HitCounterModelMixin):
131 132 return User.objects.get(username=self.modified_by)
132 133 except User.DoesNotExist:
133 134 return None
  135 +
  136 +
  137 +class WikiCollabCount(models.Model):
  138 + author = models.TextField(primary_key=True)
  139 + count = models.IntegerField()
  140 +
  141 + class Meta:
  142 + verbose_name = _('Attachment')
  143 + verbose_name_plural = _('Attachment')
  144 +
  145 +
  146 +class TicketCollabCount(models.Model):
  147 + author = models.TextField(primary_key=True)
  148 + count = models.IntegerField()
  149 +
  150 + class Meta:
  151 + verbose_name = _('Attachment')
  152 + verbose_name_plural = _('Attachment')
... ...