This commit is contained in:
Ross
2025-12-04 22:49:16 +00:00
parent 23f7caa937
commit be1fea5fd4
16 changed files with 240 additions and 52 deletions
+4
View File
@@ -8,6 +8,7 @@ class DinosaurForm(forms.ModelForm):
fields = [
'name', 'era', 'diet', 'description', 'image',
'speed', 'weight', 'intelligence', 'height',
'facts',
]
widgets = {
'name': forms.TextInput(attrs={'class': 'input', 'placeholder': 'T. rex'}),
@@ -21,6 +22,9 @@ class DinosaurForm(forms.ModelForm):
'height': forms.NumberInput(attrs={'class': 'input', 'min': 0, 'max': 100}),
}
# Add facts field widget
widgets['facts'] = forms.Textarea(attrs={'class': 'textarea', 'rows': 3, 'placeholder': 'One fact per line'})
from .models import BackgroundImage