diff --git a/trans/admin.py b/trans/admin.py index df8a0a7..73fc8a9 100644 --- a/trans/admin.py +++ b/trans/admin.py @@ -35,6 +35,8 @@ class Meta: fields = ('username', 'country', 'language', 'raw_password', 'is_onsite', 'is_translating') import_id_fields = ('username',) +class ContestantInline(admin.TabularInline): + model = Contestant @admin.register(User) class CustomUserAdmin(ImportExportMixin, UserAdmin): @@ -58,6 +60,8 @@ class CustomUserAdmin(ImportExportMixin, UserAdmin): filter_horizontal = () + inlines = (ContestantInline, ) + def translate_versions(self, obj): return mark_safe('%s' % (reverse('user_trans', kwargs={'username': obj.username}), 'Translations'))