Open ahmedsalman opened 8 years ago
Hello, Thanks for reporting here. Could you please describe the issue you have? The admin component is the one I am less familiar with in the codebase as it was written before I joined the project, so your problem is not obvious to me. Do you have errors? Unexpected behavior?
If i use the above mentioned code i am getting the error 'Exception Value: 'UserManager' object has no attribute 'untranslated'
but if i remove the parent class TranslatableAdmin from CustomUserAdmin system works fine.
Oh, alright. Well, TranslationAdmin
only works on translatable models, so it won't work with User
.
That means you cannot inline a translatable model in a non-translatable admin form, unfortunately that's not supported. The issue is it would be inherently ambiguous which translations are to be used, since the main object does not have a language.
I would suggest one of the following approaches:
UserProfile
model instead as main editing point. This might be troublesome though as Django's admin does not support nested inlines.
I have extended django user model by adding it as foreign key in UserProfile Model. And I want to my User Admin to have all the fields of usermodels along with the fields of UserProfile.
Lucky which was working perfectly until i turn my UserProfile Model Translatable using django HVAD.
I am sharing my model along with admin code. Any suggestion to counter this issue is welcomed using django Hvad