# Path: survey/models.py
# class UserProfile(models.Model):
#     confirmation_code = models.CharField(max_length=20, blank=True, null=True)
#     contact_number = models.CharField(max_length=20, blank=True, null=True)
#     birth_date = models.CharField(max_length=20, blank=True, null=True)
#     im_name = models.CharField(max_length=20, blank=True, null=True)
#     user = models.ForeignKey(User)


from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.forms import ModelForm
from survey.models import UserProfile

#coding=utf-8
__author__ = 'Administrator'

class RegistrationForm(UserCreationForm):
    username = forms.CharField(max_length=30, min_length=3, label= 'Username')
    email = forms.EmailField(label="Email")
    password1 = forms.CharField(widget=forms.PasswordInput, min_length=5, label='Password' )
    password2 = forms.CharField(widget=forms.PasswordInput, min_length=5, label='Confirm password')

    class Meta:
        model = User
        fields = ("username", "email", "password1", "password2")


# Path: survey/models.py
# class UserProfile(models.Model):
#     confirmation_code = models.CharField(max_length=20, blank=True, null=True)
#     contact_number = models.CharField(max_length=20, blank=True, null=True)
#     birth_date = models.CharField(max_length=20, blank=True, null=True)
#     im_name = models.CharField(max_length=20, blank=True, null=True)
#     user = models.ForeignKey(User)


# Path: survey/forms.py
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.forms import ModelForm
from survey.models import UserProfile

#coding=utf-8
__author__ = 'Administrator'

class RegistrationForm(UserCreationForm):
    username = forms.CharField(max_length=30, min_length=3, label= 'Username')
    email = forms.EmailField(label="Email")
    password1 = forms.CharField(widget=forms.PasswordInput, min_length=5, label='Password' )
    password2 = forms.CharField(widget=forms.PasswordInput, min_length=5, label='Confirm password')

    class Meta:
        model = User
        fields = ("username", "email", "password1", "password2")


class EditProfileForm(ModelForm):
