Django.fun

Display image from external link in Django Admin Change Form

I am trying to display an image from online source (e.g. facebook) which is not a field in the model in the User Change Form.

I can successfully display it in the user list page, or in a separate Model page, or in the add new user page, but I want to add this image to the existing user editing page below username and password fields.

enter image description here

class TestForm(forms.ModelForm):
    class Meta:
        model = User
        fields = ('email', 'password')

@admin.register(User)
class UserAdmin(BaseUserAdmin):
      form = TestForm

      // ... attributes

Nothing happened even it's a test form with 2 defined model fields. I expected the page to be showing email and password only.

Answers: 0