diff options
author | luxagraf <sng@luxagraf.net> | 2019-01-09 13:29:17 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-01-09 13:29:17 -0600 |
commit | be0bb4e123240ac3ce02431b974c82f8f05d843b (patch) | |
tree | e2da7ac44be955ad5cbf32c0a35dc507ba63e844 /apps/accounts/forms.py | |
parent | d5f430d3e1e2b274d8d8f744251e8b6b4b72ebd9 (diff) |
latest changes
Diffstat (limited to 'apps/accounts/forms.py')
-rw-r--r-- | apps/accounts/forms.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/accounts/forms.py b/apps/accounts/forms.py index d53e754..2da08cb 100644 --- a/apps/accounts/forms.py +++ b/apps/accounts/forms.py @@ -1,4 +1,5 @@ from django import forms +from django.utils.translation import ugettext_lazy as _ from django_registration.forms import RegistrationForm from .models import User, UserProfile @@ -12,7 +13,15 @@ class UserForm(RegistrationForm): class ProfileForm(forms.ModelForm): class Meta: model = UserProfile - fields = '__all__' + fields = ['bio', 'photo', 'website'] + labels = { + "photo": _("Profile photo"), + "bio": _("Bio. A little about you. links are fine, line breaks are not. Keep it short and sweet, 350 characters max"), + "website": _("If you have a personal website, plug it in here."), + } + widgets = { + 'bio': forms.Textarea(attrs={'cols': 104, 'rows': 10, 'class': 'textarea-rounded'}), + } def __init__(self, *args, **kwargs): self.user = kwargs.pop("user", None) |