add nick
[laas.git] / src / account / forms.py
1 ##############################################################################
2 # Copyright (c) 2016 Max Breitenfeldt and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 import django.forms as forms
12 import pytz as pytz
13 from django.utils.translation import gettext_lazy as _
14
15 from account.models import UserProfile
16
17
18 class AccountSettingsForm(forms.ModelForm):
19     class Meta:
20         model = UserProfile
21         fields = ['company', 'email_addr', 'public_user', 'ssh_public_key', 'pgp_public_key', 'timezone']
22         labels = {
23             'email_addr': _('Email Address'),
24             'ssh_public_key': _('SSH Public Key'),
25             'pgp_public_key': _('PGP Public Key'),
26             'public_user': _('Public User')
27         }
28
29     timezone = forms.ChoiceField(choices=[(x, x) for x in pytz.common_timezones], initial='UTC')