A few notes when upgrading my Django project to v1.7 from v1.5
Here are something I want to take notes when upgrading my project to the latest version of Django, v1.7 from v1.5. 1. Model Form and Model Formset: I have to explicitly declare which fields of the model I want to include in or exclude from the form. For example: # all fields of the model class MyForm(ModelForm): class Meta: model = MyModel fields = '__all__' # some fields only class MyForm(ModelForm): class Meta: model = MyModel fields = ('first_field', 'second_field') # or exclude these fields class PtcPeriodForm(ModelForm): class Meta: model = PtcPeriod exclude = ('third_field', 'fourth_field') # formset MyFormSetBase = modelformset_factory( MyModel, extra=0, fields = ('first_field','second_field') ) # inline formset MyInlineFormSetBase = inlineformset_factory( MyModel, MySubModel, can_delete=True, fields=('some_field', 'another_field') ) 2. Default te...