Skip to content

feat(profile): add complete user profile display with demographic data #181

Description

@gery25

Issue: Incomplete User Profile Display

Problem

The profile page only shows an edit form (username, name, email, avatar, bio, location). There is no dedicated view that displays user information readably. User type, age range, nationality, registration date, last login, and usage statistics are not shown. The CustomUser model also lacks birth_date and nationality fields.

Steps

  1. Add birth_date (DateField) and nationality (CharField) fields to CustomUser in web_app/models.py
  2. Add an age_range field with choices: "18-25", "26-35", "36-45", "46-55", "56+" (or calculate from birth_date)
  3. Generate and apply migrations
  4. Create a profile display view in users/views.py that passes user type, age range, nationality, registration date, last login, total views count, and total favorites count
  5. Redesign users/templates/users/profile/user_profile.html with two modes: view mode (structured cards) and edit mode (existing form)
  6. Add a toggle button to switch between view and edit modes
  7. Update users/static/users/css/user_profile.css with profile display styles (badges, stat cards, avatar effects)
  8. Update web_app/forms.py CustomUserChangeForm to include new fields

Relevant Files

  • web_app/models.pyCustomUser new fields
  • web_app/forms.py — form fields
  • users/views.py — new or updated profile view
  • users/templates/users/profile/user_profile.html
  • users/static/users/css/user_profile.css

Metadata

Metadata

Assignees

Labels

scope: backendAPI development, business logic, server-side services, and integrations.scope: databaseSchema changes, migrations, query optimization, and data persistence.scope: frontendUI components, styling (CSS/SCSS), client-side logic, and state management.scope: ui/uxFor tasks that focus on the visual design of the login/header.type: choreFor maintenance or initial configuration tasks.type: featureNew functionality or requirement implementation.

Fields

No fields configured for Feature.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions