mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 03:32:55 +03:00
17 lines
476 B
Python
17 lines
476 B
Python
from ..forms import LocalizedCharFieldForm
|
|
from .localized_field import LocalizedField
|
|
from ..localized_value import LocalizedStringValue
|
|
|
|
|
|
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)
|