mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-04-10 08:30:59 +00:00
Handled GenericIPAddressField which is only present in Django 1.4+.
This commit is contained in:
parent
5088f591fd
commit
0f3a89cf39
1 changed files with 4 additions and 1 deletions
|
|
@ -22,10 +22,13 @@ SUPPORTED_FIELDS = (
|
|||
fields.FloatField,
|
||||
fields.DecimalField,
|
||||
fields.IPAddressField,
|
||||
fields.GenericIPAddressField, # Django 1.4+ only
|
||||
fields.files.FileField,
|
||||
fields.files.ImageField,
|
||||
)
|
||||
try:
|
||||
SUPPORTED_FIELDS += (fields.GenericIPAddressField,) # Django 1.4+ only
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
def create_translation_field(model, field_name, lang):
|
||||
|
|
|
|||
Loading…
Reference in a new issue