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

456
Views
why this happening<django.db.models.query_utils.DeferredAttribute object at 0x00000256CA7C05E0>

views.py

getting something else in output instead of values present in it I am trying but not gating answers please provide me some suggestions I think so error occurs in :(instance=Task)
from django.shortcuts import render
from django.http import *
from  MYapp.models import *
from .form import *

def venue(request):
  venue_list = Task.objects.all()

  return render(request,'MYapp/venue.html',{'venue_list': venue_list})

def navebar(request):

  return render(request,'MYapp/navebar.html')


def db(request,db_id):
  venues = Task.objects.get(pk=db_id)
  return render(request,'MYapp/db.html',{'venues': venues})

def search(request):
  if request.method =="POST":
      searched = request.POST.get('searched', False)
      Tasks =Task.objects.filter( firstname__contains = searched)
      return render(request,'MYapp/search.html',{'searched':searched, 'Tasks':Tasks})    
  else:
      return render(request,'MYapp/search.html',{})    

def update(request,db_id):
  venues = Task.objects.get(pk=db_id)
  form = TaskForm(request.POST or None, instance=Task)
  return render(request,'MYapp/update.html',{'venues': venues,'form':form})    
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

assigning a variable instead of class

 def update(request,db_id):
    venues = Task.objects.get(pk=db_id)
    form = TaskForm(request.POST or None, instance=Task)
    return render(request,'MYapp/update.html',{'venues': 
    venues,'form':form})  

do this

 def update(request,db_id):
    venues = Task.objects.get(pk=db_id)
    form = TaskForm(request.POST or None, instance=venues )
    return render(request,'MYapp/update.html',{'venues': 
    venues,'form':form}) 
over 4 years ago · Santiago Trujillo Report
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!