Commit ca95b14e authored by Franco Velasco's avatar Franco Velasco

Added error handling for widget user profile pictures

parent a74a64bf
......@@ -34,7 +34,11 @@
{% block content %}
<h1> Widget User Profile </h1>
<div class="user-page-container">
<img src="{{ MEDIA_DIR }}/widget-users/images/{{ user.id_num }}" alt="Profile Image of {{ user.get_name }}" width="192" height="192">
{% if post.profile_image %}
<img src="{{ MEDIA_DIR }}/widget-users/images/{{ user.id_num }}" alt="Profile Image of {{ user.get_name }}" width="192" height="192">
{% else %}
<img src="{% static 'Homepage/3.JPG' %}" alt="Profile Image of {{ user.get_name }}" width="192" height="192">
{% endif %}
<div class="user-page-details">
{{ user.id_num }}
<h2> {{ user.get_name }} </h2>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment