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

358
Views
No se olvide de ingresar notas ": si no ingresaron la nota para hoy e ingresaron la nota el día anterior

Tengo dos tablas, la tabla Member y la tabla Daily_Notes.

 class Member(models.Model): name = models.Charfield()

Tabla de notas_diarias

 class DailyNotes(models.Model): member= models.Foreignkey('Member') note=models.Charfield() date=models.Datetimefield(default="")

La tabla de notas diarias contiene entradas diarias

Necesito filtrar los datos, si el usuario no ha ingresado la nota para hoy e ingresó el día anterior.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede recuperar Member que hayan completado un elemento de DailyNotes el día anterior y no el día actual con:

 from datetime import date, timedelta Member.objects.filter( dailynotes__date__date=date.today() - timedelta(days=1) ).exclude( dailynotes__date__date=date.today() )
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!