from registration.forms import RegistrationFormUniqueEmail

class RegistrationUserForm(RegistrationFormUniqueEmail):

    class Meta:
        model = User
        fields = ("email")

from django import forms
from registration.forms import RegistrationFormUniqueEmail

from preferences.models import Preferences

# from django.forms import ModelForm

# class RegistrationUserForm(RegistrationFormUniqueEmail):

#     class Meta:
#         model = User
#         fields = ("email")


class PreferencesForm(forms.ModelForm):
    class Meta:
        model = Preferences
        fields = ['representitive', 'senator', 'street_line1', 'street_line2',
                  'zipcode', 'city', 'state']

Add preferences form built off model
Add preferences form built off model

+ from django import forms
  from registration.forms import RegistrationFormUniqueEmail
  
- class RegistrationUserForm(RegistrationFormUniqueEmail):
+ from preferences.models import Preferences
  
+ # from django.forms import ModelForm
+ 
+ # class RegistrationUserForm(RegistrationFormUniqueEmail):
+ 
+ #     class Meta:
+ #         model = User
+ #         fields = ("email")
+ 
+ 
+ class PreferencesForm(forms.ModelForm):
      class Meta:
-         model = User
+         model = Preferences
-         fields = ("email")
+         fields = ['representitive', 'senator', 'street_line1', 'street_line2',
+                   'zipcode', 'city', 'state']
  
Add preferences form built off model
## Code Before:
from registration.forms import RegistrationFormUniqueEmail

class RegistrationUserForm(RegistrationFormUniqueEmail):

    class Meta:
        model = User
        fields = ("email")

## Instruction:
Add preferences form built off model
## Code After:
from django import forms
from registration.forms import RegistrationFormUniqueEmail

from preferences.models import Preferences

# from django.forms import ModelForm

# class RegistrationUserForm(RegistrationFormUniqueEmail):

#     class Meta:
#         model = User
#         fields = ("email")


class PreferencesForm(forms.ModelForm):
    class Meta:
        model = Preferences
        fields = ['representitive', 'senator', 'street_line1', 'street_line2',
                  'zipcode', 'city', 'state']
