Cómo se pronuncia Convert date field to value 1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cómo se pronuncia Convert date field to value 1

Harold A

Hello everyone, I am a beginner in Django. I would like you to guide me on how to solve the next problem I have.


In my application I have fields from date01 = models.DataFiled(blank = True, null = True) to date31 = models.DataFiled(blank = True, null = True), This to know the number of days a person attended during the month . Depending on the dates saved in the fields. And show the dates you attended and the sum of the days during the month.

Example: Juan attended 15 days, Pedro attended 20 days.


Thanks for the help.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a8f0411a-e289-4a39-bfb2-c87047d1b33d%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Cómo se pronuncia Convert date field to value 1

Gil Obradors
Hi!

For mi, You need 2 models:
-users
-attention


Users save the persons
Atention save one attend event

Atention, will have : -date datefield,  user foreignkey(users)


Then you can do query sets like, how many attentions has Pepito. How many attentions has Pepito this mounth,  last days... this year.....



PD: if is more easy for you, you  can do 1 model, adding user atribute to attention

PD2: may be if you play with django-admin, you will understand a greater idea from Models

Thanks!






Missatge de Harold A <[hidden email]> del dia dv., 16 d’ag. 2019 a les 3:35:

Hello everyone, I am a beginner in Django. I would like you to guide me on how to solve the next problem I have.


In my application I have fields from date01 = models.DataFiled(blank = True, null = True) to date31 = models.DataFiled(blank = True, null = True), This to know the number of days a person attended during the month . Depending on the dates saved in the fields. And show the dates you attended and the sum of the days during the month.

Example: Juan attended 15 days, Pedro attended 20 days.


Thanks for the help.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a8f0411a-e289-4a39-bfb2-c87047d1b33d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK-JoTTj8RHxh4yGC4V87KGEam5a%2BZPY-5e9QCoGDixzXHRKKA%40mail.gmail.com.