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

243
Views
How to rename the columns of returned fields from Django model?

I have a Django model called Hormone:

class Hormone:
  material = model.ForeignKey('Material',to_field='code')

class Material:
 code = model.integer()
 type = model.text()

I have a trouble to rename the intermediate result fields for the material meaning by using this syntax.

Hormone.objects.extra(select={"content":"material__meaning"}).values("content").all()

How do I correctly rename the key?

Thanks

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!