Advertisement
horozov86

default profile_details.html

Oct 21st, 2024
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.42 KB | None | 0 0
  1. {% extends 'base.html' %}
  2. {% load static %}
  3.  
  4. {% block main_content %}
  5. <link rel="stylesheet" href="{% static 'style/details_profile.css' %}">
  6.  
  7. <h1>Profile Details</h1>
  8.  
  9. <div class="info-section">
  10.     <!-- Profile Photo -->
  11.     <div class="profile-photo">
  12.         {% if profile.profile_photo %}
  13.             <img class="car-img" src="{{ profile.profile_photo.url }}" alt="Profile Image" />
  14.         {% else %}
  15.             <img class="car-img" src="{% static 'images/default_profile_image.png' %}" alt="Default Profile Image" />
  16.         {% endif %}
  17.     </div>
  18.  
  19.     <!-- Name Display -->
  20.     {% if profile.first_name or profile.last_name %}
  21.         <h1>
  22.             {{ profile.first_name }} {{ profile.last_name|default:'' }}
  23.         </h1>
  24.     {% endif %}
  25.  
  26.     <!-- Email -->
  27.     <p class="description">Email: {{ user.email }}</p>
  28.  
  29.     <!-- Age -->
  30.     <p class="description">Age: {{ profile.age }}</p>
  31.  
  32.     <!-- Total Photos -->
  33.     <p class="description">Total photos: {{ place_count }}</p>
  34.  
  35.     <!-- Action Buttons -->
  36.     <div class="buttons">
  37.         <a href="{% url 'edit profile' pk=profile.pk %}" class="edit-button">Edit</a>
  38.         <a href="{% url 'delete profile' pk=profile.pk %}" class="delete-button">Delete</a>
  39.     </div>
  40. </div>
  41.  
  42. <!-- Optional Form for Additional Actions -->
  43. <form method="post" enctype="multipart/form-data">
  44.     {% csrf_token %}
  45.     {{ form.as_p }}
  46. </form>
  47.  
  48. {% endblock %}
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement