mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-04-24 19:32:53 +03:00
17 lines
456 B
Python
17 lines
456 B
Python
from ..forms import LocalizedCharFieldForm
|
|
from .field import LocalizedField
|
|
from ..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)
|