Skip to content

Commit

Permalink
add translation labels on forms
Browse files Browse the repository at this point in the history
  • Loading branch information
yvangodard committed May 15, 2015
1 parent 94ff554 commit caac163
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions account/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def save(self):

class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True)
items_per_page = models.IntegerField(default=25)
favourite_tags = models.ManyToManyField(Tag, blank=True)
items_per_page = models.IntegerField(verbose_name=_('Items per page'), default=25)
favourite_tags = models.ManyToManyField(Tag, verbose_name=_('Favourite tags'), blank=True)
password_changed = models.DateTimeField(default=now)

def __unicode__(self):
Expand Down
24 changes: 12 additions & 12 deletions cred/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ class Cred(models.Model):
objects = SearchManager()

# User changable fields
title = models.CharField(max_length=64, db_index=True)
url = models.URLField(blank=True, null=True, db_index=True)
username = models.CharField(max_length=250, blank=True, null=True, db_index=True)
password = models.CharField(max_length=250, blank=True, null=True)
descriptionmarkdown = models.BooleanField(default=False, verbose_name=_('Markdown Description'))
description = models.TextField(blank=True, null=True)
group = models.ForeignKey(Group)
groups = models.ManyToManyField(Group, related_name="child_creds", blank=True, null=True, default=None)
tags = models.ManyToManyField(Tag, related_name='child_creds', blank=True, null=True, default=None)
iconname = models.CharField(default='Key.png', max_length=64, verbose_name='Icon')
ssh_key = SizedFileField(storage=CredAttachmentStorage(), max_upload_size=settings.RATTIC_MAX_ATTACHMENT_SIZE, null=True, blank=True, upload_to='not required')
attachment = SizedFileField(storage=CredAttachmentStorage(), max_upload_size=settings.RATTIC_MAX_ATTACHMENT_SIZE, null=True, blank=True, upload_to='not required')
title = models.CharField(verbose_name=_('Title'), max_length=64, db_index=True)
url = models.URLField(verbose_name=_('URL'), blank=True, null=True, db_index=True)
username = models.CharField(verbose_name=_('Username'), max_length=250, blank=True, null=True, db_index=True)
password = models.CharField(verbose_name=_('Password'), max_length=250, blank=True, null=True)
descriptionmarkdown = models.BooleanField(verbose_name=_('Markdown Description'), default=False, )
description = models.TextField(verbose_name=_('Description'), blank=True, null=True)
group = models.ForeignKey(Group, verbose_name=_('Group'))
groups = models.ManyToManyField(Group, verbose_name=_('Groups'), related_name="child_creds", blank=True, null=True, default=None)
tags = models.ManyToManyField(Tag, verbose_name=_('Tags'), related_name='child_creds', blank=True, null=True, default=None)
iconname = models.CharField(verbose_name=_('Icon'), default='Key.png', max_length=64, verbose_name='Icon')
ssh_key = SizedFileField(verbose_name=_('SSH key'), storage=CredAttachmentStorage(), max_upload_size=settings.RATTIC_MAX_ATTACHMENT_SIZE, null=True, blank=True, upload_to='not required')
attachment = SizedFileField(verbose_name=_('Attachment'), storage=CredAttachmentStorage(), max_upload_size=settings.RATTIC_MAX_ATTACHMENT_SIZE, null=True, blank=True, upload_to='not required')

# Application controlled fields
is_deleted = models.BooleanField(default=False, db_index=True)
Expand Down

0 comments on commit caac163

Please sign in to comment.