Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
Users created posts not being returned to template? Django

the user is able to create a post and it will be shown the in the list. I've also created a users profile/summary page where the user can edit/delete their posts.

Currently, it's showing blank and I'm not quite sure why?Am I supposed to get the instance or is it fine the way it is?

Model

class Aircraft(AircraftModelBase):
    user = models.ForeignKey(User)
    manufacturer = SortableForeignKey(Manufacturer)
    aircraft_type = SortableForeignKey(AircraftType)

View

def upload_overview(request):
    uploaded_aircraft = Aircraft.objects.filter(user=request.user)
    return render(request,'account/upload_overview.html',{'UploadedAircraft':uploaded_aircraft})

Template

<div class="container">
    <div class="row aircraft">
      {% if UploadedAircraft %}
      {% for upload in UploadedAircraft %}
        <div class="col-lg-offset-0 col-md-4 col-sm-3 item">
            <div class="box"><a href="{{ upload.aircraft.get_absolute_url }}"><img src="{{ upload.aircraft.image.url }}" width="200px" height="200px" alt="{{ upload.aircraft.title }}"/></a>
                <h3 class="name"><a href="{{ upload.aircraft.get_absolute_url }}">{{ upload.aircraft.name }}</a></h3>
            </div>
        </div>
        {% endfor %}
        {% else %}
              <h2 class="text-center">No uploaded aircraft posts..</h2></div>
        {% endif %}
    </div>
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!