You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made an app where translated entries are added by using fixtures.
I wanted to integrate the app in the admin site, but only to see what
translations are available, so I just set readonly_fields on the admin inline
to contain the field 'language_code'. And it raised an error...
I made an app where translated entries are added by using fixtures.
I wanted to integrate the app in the admin site, but only to see what
translations are available, so I just set readonly_fields on the admin inline
to contain the field 'language_code'. And it raised an error...
Reproducing the error:
My models.py looks like this:
My admin.py looks like this:
This raises a KeyError because the field 'language_code' is not available in the
form:
Django Version: 1.5.dev20121025064951
Exception Type: KeyError
Exception Value: 'language_code'
Exception Location: /usr/local/lib/python2.7/dist-packages/multilingual_model/forms.py in _construct_available_languages, line 56
Python Executable: /usr/bin/python
Python Version: 2.7.3
The text was updated successfully, but these errors were encountered: