This commit is contained in:
ariska committed 2024-11-19 13:00:24 +07:00
commit 45e3c1f698
3462 files changed
+617437

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
from django import forms
from contact.models import *
# # # # # # # # # # # # # # # # # #
# Contact Form #
# # # # # # # # # # # # # # # # # #
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = '__all__'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for field in self.fields.values():
field.widget.attrs['class'] = 'form-control'
# # # # # # # # # # # # # # # # # #
# Contact Page SEO Form #
# # # # # # # # # # # # # # # # # #
class contactPageSEOForm(forms.ModelForm):
class Meta:
model = contactPageSEO
fields = '__all__'
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
for field in self.fields.values():
field.widget.attrs['class'] = 'form-control'