mybuddy/babybuddy/forms.py

26 lines
605 B
Python
Raw Normal View History

2017-11-11 22:27:42 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
2017-12-02 21:20:15 +00:00
from django.contrib.auth.forms import PasswordChangeForm
2017-11-11 22:27:42 +00:00
from django.contrib.auth.models import User
from .models import Settings
class UserForm(forms.ModelForm):
class Meta:
model = User
fields = ['first_name', 'last_name', 'email']
2017-12-02 21:20:15 +00:00
class UserPasswordForm(PasswordChangeForm):
class Meta:
fields = ['old_password', 'new_password1', 'new_password2']
2017-11-11 22:27:42 +00:00
class UserSettingsForm(forms.ModelForm):
class Meta:
model = Settings
fields = ['dashboard_refresh_rate']