mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-11-01 02:48:58 +03:00
Shorten names for everything
This commit is contained in:
16
localized_fields/fields/char_field.py
Normal file
16
localized_fields/fields/char_field.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user