move form to folder
This commit is contained in:
parent
52dbe89582
commit
07bea333bc
2 changed files with 3 additions and 1 deletions
2
hub/services/forms/__init__.py
Normal file
2
hub/services/forms/__init__.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
from .lead import LeadForm
|
||||
from .image_library import ImageLibraryField, ImageLibraryWidget
|
15
hub/services/forms/lead.py
Normal file
15
hub/services/forms/lead.py
Normal 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}),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue