<filename>account/forms.py
from django import forms
from django.contrib.auth.models import User 

from captcha.fields import ReCaptchaField


from .models import Profile

class RegisterForm(forms.ModelForm):
	password = forms.CharField(widget = forms.PasswordInput)
	password2 = forms.CharField(widget = forms.PasswordInput)
	captcha = ReCaptchaField()

	class Meta:
		model = User
		fields = ['username', 'first_name', 'last_name', 'email']


	def clean_password2(self):
		cd = self.cleaned_data
		if cd['password'] != cd['password2']:
			raise forms.ValidationError('the passwords you entered do not match')
		return cd['password']

class ProfileEditForm(forms.ModelForm):
	class Meta:
		model = Profile 
		fields = ['display_picture']

class UserEditForm(forms.ModelForm):
	class Meta:
		model = User 
		fields = ['first_name', 'last_name', 'email']
<filename>account/forms.py
from django import forms
from django.contrib.auth.models import User 

from captcha.fields import ReCaptchaField


from .models import Profile

class RegisterForm(forms.ModelForm):
	password = forms.CharField(widget = forms.PasswordInput)
	password2 = forms.CharField(widget = forms.PasswordInput)
	captcha = ReCaptchaField()

	class Meta:
		model = User
		fields = ['username', 'first_name', 'last_name', 'email']


	def clean_password2(self):
		cd = self.cleaned_data
		if cd['password'] != cd['password2']:
			raise forms.ValidationError('the passwords you entered do not match')
		return cd['password']

class ProfileEditForm(forms.ModelForm):
	class Meta:
		model = Profile 
		fields = ['display_picture']

class UserEditForm(forms.ModelForm):
	class Meta:
		model = User 
		fields = ['first_name', 'last_name', 'email']