Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateForm(forms.ModelForm):
- class Meta:
- model = Earth
- fields = ['owner', 'year', 'cadastral_number', 'area', 'total', 'price', 'privilege', 'city', 'property', 'image',
- 'notes']
- widgets = {
- 'owner': forms.Select(attrs={
- 'class': 'form-control live-search-select2',
- }),
- 'year': forms.NumberInput(attrs={
- 'class': 'form-control',
- 'type': 'number',
- }),
- 'cadastral_number': forms.TextInput(attrs={
- 'class': 'form-control',
- 'type': 'text',
- }),
- 'area': forms.NumberInput(attrs={
- 'class': 'form-control',
- 'type': 'number',
- }),
- 'total': forms.NumberInput(attrs={
- 'class': 'form-control',
- 'type': 'number',
- }),
- 'price': forms.NumberInput(attrs={
- 'class': 'form-control',
- 'type': 'number',
- }),
- 'privilege': forms.Select(attrs={
- 'class': 'form-control live-search-select2',
- }),
- 'city': forms.Select(attrs={
- 'class': 'form-control live-search-select2',
- }),
- 'property': forms.Select(attrs={
- 'class': 'form-control live-search-select2',
- }),
- 'image': forms.ImageField(),
- 'notes': forms.TextInput(attrs={
- 'class': 'form-control',
- 'type': 'text',
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement