When I'm in a view other than editing users or creating users, it does not show me the profile image.
Here when I'm in any of the views I have, it does not show me its profile picture example: view on products Source code:
<img src='' alt="jorgelca2"
class="circle responsive-img valign profile-image">
This is when I go in to edit a user or to register if he shows me the profile picture
source code:
<img src='/media/avatars/O3EJ9J0.jpg' alt="jorgelca2" class="circle responsive-img valign profile-image">
my base.html which is that all the views entangle the design. so I call the image
<img src='{{ object.avatar.url }}'
alt="{{ user.username }}"
class="circle responsive-img valign profile-image">
I'm extending to user models.py
class Usuario(AbstractUser):
telefono = models.CharField('Télefono', max_length=15)
avatar = models.ImageField('avatar para tu perfil', upload_to='avatars/', blank=True, null=True)
fondo = models.ImageField('Elige tu fondo de perfil', upload_to='fondos/', blank=True, null=True)
administrator views.py
class CodeaAdminView(LoginRequiredMixin, TemplateView):
template_name = 'codea_admin/codea_admin.html'