Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6117851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:22:05+00:00 2026-05-23T15:22:05+00:00

I have extended User via AUTH_PROFILE_MODULE to include a ManyToMany field to Projects the

  • 0

I have extended User via AUTH_PROFILE_MODULE to include a ManyToMany field to Projects the user is involved in.

I want to reverse the relationship, and get the Users associated with a given Project.

My users have profiles (I’ve successfully returned them with related_projects = u.profile.projects).

related_users = project.userprofile_set.all() is giving me something – {% for user in related_users %} {{ user }} {% endfor %} yields User Profile for: richlyon. But I can’t get {{ user }} to yield any fields. I’ve tried {{ user.username }}.

Question: am I going about this the wrong way? And if I’m not, how do I get field information out of a reverse relationship on an extended User profile?

Thanks as always for your time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:22:05+00:00Added an answer on May 23, 2026 at 3:22 pm

    Your ‘profile’ object is not a User, nor is it extending User (in an object-oriented sense). Rather, it’s a separate model that has a ForeignKey to a User.

    User > Profile > Projects

    In the code you posted, it looks like you’re expecting a User object to be returned from the project.userprofile_set.all() query set. However, these are going to be your intermediate profile objects from which you can then access the user.

    Something like this:

    related_profiles = project.userprofile_set.all()
    
    {% for profile in related_profiles %} 
        {{ profile.user.username }} 
    {% endfor %} 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have extended a server control (not a user control) and put the code
I have extended the ASP.NET MVC Html Helper to include my own ValidationImage that
In my application I have an extended User model called UserProfile. This user can
I have extended Django's User Model using a custom user profile called UserExtension .
I have an extended UserProfile model in django: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True)
I have a list (of messages) and I want to give the user the
i have asked the extended permission for user's primary email address. but, i can't
I have Admin User extended/subclassed by Teacher class. How to prevent Teachers from seeing
I am using log4net 1.2.10.0. I have extended ILog and LogManager to include a
I am using extended version of the UserCreationForm to add users via my own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.