mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-25 19:52:54 +03:00
17 lines
474 B
Python
17 lines
474 B
Python
from ..forms import LocalizedCharFieldForm
|
|
from .localized_field import LocalizedField
|
|
from ..localized_value import LocalizedStingValue
|
|
|
|
|
|
class LocalizedCharField(LocalizedField):
|
|
attr_class = LocalizedStingValue
|
|
|
|
def formfield(self, **kwargs):
|
|
"""Gets the form field associated with this field."""
|
|
defaults = {
|
|
'form_class': LocalizedCharFieldForm
|
|
}
|
|
|
|
defaults.update(kwargs)
|
|
return super().formfield(**defaults)
|