Changes between Initial Version and Version 2 of Ticket #25887
- Timestamp:
- Dec 8, 2015, 1:46:07 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25887
- Property Cc added
-
Ticket #25887 – Description
initial v2 7 7 class CustomForeignKey(models.ForeignKey): 8 8 def formfield(self, **kwargs): 9 defaults = {'form_class': IntegerField} # or a subclass ofIntegerField9 defaults = {'form_class': forms.IntegerField} # or a subclass of forms.IntegerField 10 10 defaults.update(kwargs) 11 11 return super(CustomForeignKey, self).formfield(**defaults) … … 22 22 # This will work fine until I try to submit the form 23 23 class NormalFKModelForm(forms.ModelForm): 24 fk = IntegerField()24 fk = forms.IntegerField() 25 25 class Meta: 26 26 model = NormalFKModel