from django.forms import ModelForm

from localflavor.gb.forms import GBPostcodeField

from .models import Member

class MemberUpdateForm(ModelForm):
    class Meta:
        model = Member
        exclude = ['token', 'user', 'constituency', 'mapit_json']

    postcode = GBPostcodeField(required=True)
from django.forms import ModelForm

from localflavor.gb.forms import GBPostcodeField

from .models import Member

class MemberUpdateForm(ModelForm):
    class Meta:
        model = Member
        exclude = [
            'token',
            'user',
            'constituency',
            'mapit_json',
            'source',
        ]

    postcode = GBPostcodeField(required=True)

Exclude most fields from User Profiles
Exclude most fields from User Profiles

  from django.forms import ModelForm
  
  from localflavor.gb.forms import GBPostcodeField
  
  from .models import Member
  
  class MemberUpdateForm(ModelForm):
      class Meta:
          model = Member
-         exclude = ['token', 'user', 'constituency', 'mapit_json']
+         exclude = [
+             'token',
+             'user',
+             'constituency',
+             'mapit_json',
+             'source',
+         ]
  
      postcode = GBPostcodeField(required=True)
+ 
Exclude most fields from User Profiles
## Code Before:
from django.forms import ModelForm

from localflavor.gb.forms import GBPostcodeField

from .models import Member

class MemberUpdateForm(ModelForm):
    class Meta:
        model = Member
        exclude = ['token', 'user', 'constituency', 'mapit_json']

    postcode = GBPostcodeField(required=True)
## Instruction:
Exclude most fields from User Profiles
## Code After:
from django.forms import ModelForm

from localflavor.gb.forms import GBPostcodeField

from .models import Member

class MemberUpdateForm(ModelForm):
    class Meta:
        model = Member
        exclude = [
            'token',
            'user',
            'constituency',
            'mapit_json',
            'source',
        ]

    postcode = GBPostcodeField(required=True)
