Created
July 11, 2014 17:02
-
-
Save fandrefh/c62a7fa2b070e5c2fea0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
from django import forms | |
from django.contrib.auth.models import User | |
from .models import PerfilUsuario | |
class UserForm(forms.ModelForm): | |
first_name = forms.CharField(label='Nome') | |
last_name = forms.CharField(label='Sobrenome') | |
username = forms.CharField(label='Nome de usuário') | |
email = forms.EmailField(label='E-mail') | |
password = forms.CharField(label='Senha', widget=forms.PasswordInput()) | |
class Meta: | |
model = User | |
fields = ('first_name', 'last_name', 'username', 'email', 'password', 'is_active') | |
class PerfilUsuarioForm(forms.ModelForm): | |
class Meta: | |
model = PerfilUsuario | |
exclude = ('user') |
herberthamaral
commented
Jul 11, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment