22 lines
506 B
Python
Raw Normal View History

2013-09-28 18:33:45 +02:00
# -*- coding: utf-8 -*-
from django import forms
2013-11-24 09:37:47 +01:00
from django.contrib.auth import get_user_model
2013-09-28 18:33:45 +02:00
from .models import UserProfile
2013-09-29 01:21:44 +02:00
class UserForm(forms.ModelForm):
2013-10-03 17:21:18 +02:00
class Meta(object):
2013-11-24 09:37:47 +01:00
model = get_user_model()
fields = ['first_name', 'last_name', 'email']
widgets = {
'email': forms.widgets.TextInput(attrs=dict(autofocus=None)),
}
class UserProfileForm(forms.ModelForm):
class Meta(object):
model = UserProfile
fields = ['language', ]