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

  • Home
  • SEARCH
  • 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 8529939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:08:37+00:00 2026-06-11T09:08:37+00:00

I have an attendee list for an event. Attendees objects are keyed to Profile

  • 0

I have an attendee list for an event. Attendees objects are keyed to Profile Objects.
Within the view I’m trying to append 3 lists to make up attendee_list.

Models.py

class Attendee(models.Model):
    created = models.DateTimeField(auto_now_add=True)
    modified = models.DateTimeField(auto_now=True)
    profile = models.ForeignKey(Profile)
    event = models.ForeignKey(Event)
    verified = models.BooleanField(default=False)
    from_user = models.BooleanField(default=False)

view.py

verified_attendees = [va.profile for va in Attendee.objects.filter(event=event, verified=True)]
unverified_attendees = [uva.profile for uva in Attendee.objects.filter(event=event, verified=False, from_user=True)
pending_attendees = [pa.profile for pa in Attendee.objects.filter(event=event, from_user=False, verified=False)]
attendee_list = ????

What I’d like to accomplish(template):

{% for attendee in attendees_list %}

...
Name            |       Status
--------------------------------------
Jon Doe         |       Pending
Annie Smith     |       Verified!
Abraham Snow    |       Confirm Yes/No?

How can I throw these 3 lists into one, and still check which list they belong to (whether in the view or template)? The reason why I want one list is because I will be sorting attendees alphabetically. Thanks for you suggestions in advance!

  • 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-06-11T09:08:38+00:00Added an answer on June 11, 2026 at 9:08 am

    Why split in the first place when you could do:

    attendees = [(a.profile, a.verified, a.from_user)
                     for a in Attendee.objects.filter(event=event)]
    

    and then:

    {% for attendee, verified, from_user in attendees_list %}
    

    You can then control what each says at the template level using {% if verified %} or {% if from_user %} blocks.

    Alternatively, you can just do:

    attendees = Attendee.objects.filter(event=event)
    

    and refer to attendee.profile, attendee.verified, and attendee.from_user directly in the template.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to check whether a user is attending an event within a list
I have a list of Accommodation objects bound to a Repeater, and then a
Let say I have Event controller. In the controller, I have 3 actions: attendees,
I'm trying to work on a 'Select Attendees' list for a website I'm working
Have deployed numerous report parts which reference the same view however one of them
Have a painfully simple blog Post creator, and I'm trying to check if the
Have 2 tables in Access 2007, both lists of certain tasks to be accomplished.
Say we have a list of rooms with their capacities and a list of
Let's say that I have a list of prizes: PrizeA PrizeB PrizeC And, for
I have an Index.cshtml view: @model AttendenceModel @{ Layout = ~/Views/Shared/_Layout.cshtml; } @using (Html.BeginForm(VisOppsummering,

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.