Skip to content

Commit

Permalink
Add verbose names
Browse files Browse the repository at this point in the history
  • Loading branch information
SalmanAsh committed Jul 11, 2024
1 parent 7f3efa4 commit bf18e02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions api/models/agreement_signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class AgreementSignature(models.Model):
contributor_id: int
contributor = models.ForeignKey(Contributor, on_delete=models.CASCADE)

agreement_id = models.CharField(max_length=40)
signed_at = models.DateTimeField()
agreement_id = models.CharField(_("agreement id"), max_length=40)
signed_at = models.DateTimeField(_("signed at"))

class Meta(TypedModelMeta):
unique_together = ["contributor", "agreement_id"]
verbose_name = _("agreement_signature")
verbose_name_plural = _("agreement_signatures")
verbose_name = _("agreement signature")
verbose_name_plural = _("agreement signatures")

def __str__(self):
cont = f"Contributor {self.contributor} signed"
Expand Down
10 changes: 5 additions & 5 deletions api/models/contributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class Contributor(models.Model):
"""A contributor that contributes to a repo"""

id = models.IntegerField(primary_key=True)
email = models.EmailField()
name = models.TextField()
location = models.TextField()
html_url = models.TextField()
avatar_url = models.TextField()
email = models.EmailField(_("email"))
name = models.TextField(_("name"))
location = models.TextField(_("location"))
html_url = models.TextField(_("html url"))
avatar_url = models.TextField(_("avatar url"))

class Meta(TypedModelMeta):
verbose_name = _("contributor")
Expand Down
2 changes: 1 addition & 1 deletion api/models/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Repository(models.Model):
contributor = models.ForeignKey(Contributor, on_delete=models.CASCADE)

gh_id = models.IntegerField(_("GitHub ID"))
points = models.IntegerField(default=0)
points = models.IntegerField(_("points"), default=0)

class Meta(TypedModelMeta):
unique_together = ["contributor", "gh_id"]
Expand Down

0 comments on commit bf18e02

Please sign in to comment.