Files
ihrm/facedetection/forms.py
elchimeneas 641a4d4842 i18n: improve translations across horilla (#1014)
- Added trans() / _() translations to models, forms and templates.
- Updated Spanish locale (django.po).
- Fixed missing verbose_name translations.

Known issues:
- "Leave Type" label in horilla/leave/forms.py not translating.
- "Performance" and "Mails automations" still pending.
2025-12-23 11:10:04 +05:30

22 lines
608 B
Python

from django.template.loader import render_to_string
from base.forms import ModelForm
from facedetection.models import FaceDetection
from django.utils.translation import gettext_lazy as _
class FaceDetectionSetupForm(ModelForm):
verbose_name = _("Facedetection Configuration")
class Meta:
model = FaceDetection
exclude = ["company_id"]
def as_p(self):
"""
Render the form fields as HTML table rows with Bootstrap styling.
"""
context = {"form": self}
table_html = render_to_string("common_form.html", context)
return table_html