from django import forms

from oscar.core.loading import get_model


class WeightBasedForm(forms.ModelForm):

    class Meta:
        model = get_model('shipping', 'WeightBased')
        fields = ['name', 'description', 'default_weight', 'countries']


class WeightBandForm(forms.ModelForm):

    def __init__(self, method, *args, **kwargs):
        super(WeightBandForm, self).__init__(*args, **kwargs)
        self.instance.method = method

    class Meta:
        model = get_model('shipping', 'WeightBand')
        fields = ('upper_limit', 'charge')

from django import forms

from oscar.core.loading import get_model


class WeightBasedForm(forms.ModelForm):

    class Meta:
        model = get_model('shipping', 'WeightBased')
        fields = ['description', 'default_weight', 'countries']


class WeightBandForm(forms.ModelForm):

    def __init__(self, method, *args, **kwargs):
        super(WeightBandForm, self).__init__(*args, **kwargs)
        self.instance.method = method

    class Meta:
        model = get_model('shipping', 'WeightBand')
        fields = ('upper_limit', 'charge')

Remove non-existing field from WeightBasedForm
Remove non-existing field from WeightBasedForm

Django 1.10 errors (correctly) on this
