mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-24 19:32:53 +03:00
15 lines
434 B
Python
15 lines
434 B
Python
from ..forms import LocalizedCharFieldForm
|
|
from ..value import LocalizedStringValue
|
|
from .field import LocalizedField
|
|
|
|
|
|
class LocalizedCharField(LocalizedField):
|
|
attr_class = LocalizedStringValue
|
|
|
|
def formfield(self, **kwargs):
|
|
"""Gets the form field associated with this field."""
|
|
defaults = {"form_class": LocalizedCharFieldForm}
|
|
|
|
defaults.update(kwargs)
|
|
return super().formfield(**defaults)
|