move form to folder

This commit is contained in:
Tobias Brunner 2025-07-04 16:49:29 +02:00
parent 52dbe89582
commit 07bea333bc
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
from .lead import LeadForm
from .image_library import ImageLibraryField, ImageLibraryWidget

View file

@ -0,0 +1,15 @@
from django import forms
from ..models import Lead
class LeadForm(forms.ModelForm):
class Meta:
model = Lead
fields = ["name", "company", "email", "phone", "message"]
widgets = {
"name": forms.TextInput(attrs={"class": "form-control"}),
"company": forms.TextInput(attrs={"class": "form-control"}),
"email": forms.EmailInput(attrs={"class": "form-control"}),
"phone": forms.TextInput(attrs={"class": "form-control"}),
"message": forms.Textarea(attrs={"class": "form-control", "rows": 4}),
}