Re: Django Search Between 2 Dates

2021-02-04 Thread Siarhei Siarhei
https://otus.ru/nest/post/286/

среда, 3 февраля 2021 г. в 21:12:36 UTC+3, thiago.parolin: 

> If you want clien-side, then you need to make some script-fu using jquery 
> or anything like that.
>
> Em qua., 3 de fev. de 2021 às 10:40, Steven Mapes  
> escreveu:
>
>> Are you looking at client-side filtering within datatables or server side 
>> filtering? Thiago's suggestion related to using filters when you fetch the 
>> queryset (
>> https://docs.djangoproject.com/en/3.1/topics/db/queries/#retrieving-specific-objects-with-filters
>> )
>>
>> On Wednesday, 3 February 2021 at 13:24:40 UTC eugenet...@gmail.com wrote:
>>
>>> Dear Thiago,
>>>
>>> Can I have some documentations or sample codes please?
>>>
>>> On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin  
>>> wrote:
>>>
 Hi...
 Normally i use field__lte and field__gte 

 Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE  
 escreveu:

> Dear Team,
>
> I need help. I have a list of Items in a table. And I want to filter 
> some data between dates (start and end date). Please help me to do a 
> search 
> between the two date. I am using Data table but I can use the other way 
> if 
> possible for this purpose.
>
> Regards, 
>
> -- 
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene@aims-cameroon.org
>eugenet...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>
> -- 
> 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 django-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.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 django-users...@googlegroups.com.

>>> To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
  
 
 .

>>>
>>>
>>> -- 
>>> *TUYIZERE Eugene*
>>>
>>>
>>>
>>> *Msc Degree in Mathematical Science*
>>>
>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
>>> Garden-Lime, Cameroon*
>>>
>>> Bsc in Computer Science
>>>
>>> *UR-Nyagatare Campus*
>>>
>>> Email: eugene@aims-cameroon.org
>>>eugenet...@gmail.com
>>>
>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>
>> -- 
>> 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 django-users...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/98702a6a-6341-4495-b879-977e7447c6f8n%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Thiago Luiz Parolin
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/de67f9b5-ca03-44fe-a325-5510da2912ben%40googlegroups.com.


Re: Django Search Between 2 Dates

2021-02-03 Thread Thiago Luiz Parolin
If you want clien-side, then you need to make some script-fu using jquery
or anything like that.

Em qua., 3 de fev. de 2021 às 10:40, Steven Mapes 
escreveu:

> Are you looking at client-side filtering within datatables or server side
> filtering? Thiago's suggestion related to using filters when you fetch the
> queryset (
> https://docs.djangoproject.com/en/3.1/topics/db/queries/#retrieving-specific-objects-with-filters
> )
>
> On Wednesday, 3 February 2021 at 13:24:40 UTC eugenet...@gmail.com wrote:
>
>> Dear Thiago,
>>
>> Can I have some documentations or sample codes please?
>>
>> On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin 
>> wrote:
>>
>>> Hi...
>>> Normally i use field__lte and field__gte
>>>
>>> Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
>>> escreveu:
>>>
 Dear Team,

 I need help. I have a list of Items in a table. And I want to filter
 some data between dates (start and end date). Please help me to do a search
 between the two date. I am using Data table but I can use the other way if
 possible for this purpose.

 Regards,

 --
 *TUYIZERE Eugene*



 *Msc Degree in Mathematical Science*

 *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
 Garden-Lime, Cameroon*

 Bsc in Computer Science

 *UR-Nyagatare Campus*

 Email: eugene@aims-cameroon.org
eugenet...@gmail.com

 Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

 --
 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 django-users...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.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 django-users...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> *TUYIZERE Eugene*
>>
>>
>>
>> *Msc Degree in Mathematical Science*
>>
>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>> Garden-Lime, Cameroon*
>>
>> Bsc in Computer Science
>>
>> *UR-Nyagatare Campus*
>>
>> Email: eugene@aims-cameroon.org
>>eugenet...@gmail.com
>>
>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/98702a6a-6341-4495-b879-977e7447c6f8n%40googlegroups.com
> 
> .
>


-- 
Thiago Luiz Parolin

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANbmKyuJDzEK9QjTWJ%2B7uM81EJAJ-TVu%3DWXQxq%2Bk_jKMsmZZ%3DQ%40mail.gmail.com.


Re: Django Search Between 2 Dates

2021-02-03 Thread Thiago Luiz Parolin
I will try to explain, although I am not a good teacher.

Suppose you have an 'Example' model that has a 'data' field with
'auto_now_add = True'
And a function 'yesterday()' that returns yesterday, and 'past()' that
returns 'yesterday() minus some days'.

if you want to filter items between yesterday() and past(), you could
use something like:
Example.objects.filter(data__gte=past(),data__lte=yesterday())

 or using .exclude too

If you need more info, you can get better in django docs:
https://docs.djangoproject.com/en/3.1/ref/models/querysets/

I hope I helped a little despite my bad English.






Em qua., 3 de fev. de 2021 às 10:24, Eugene TUYIZERE <
eugenetuyiz...@gmail.com> escreveu:

> Dear Thiago,
>
> Can I have some documentations or sample codes please?
>
> On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin 
> wrote:
>
>> Hi...
>> Normally i use field__lte and field__gte
>>
>> Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
>> escreveu:
>>
>>> Dear Team,
>>>
>>> I need help. I have a list of Items in a table. And I want to filter
>>> some data between dates (start and end date). Please help me to do a search
>>> between the two date. I am using Data table but I can use the other way if
>>> possible for this purpose.
>>>
>>> Regards,
>>>
>>> --
>>> *TUYIZERE Eugene*
>>>
>>>
>>>
>>> *Msc Degree in Mathematical Science*
>>>
>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>>> Garden-Lime, Cameroon*
>>>
>>> Bsc in Computer Science
>>>
>>> *UR-Nyagatare Campus*
>>>
>>> Email: eugene.tuyiz...@aims-cameroon.org
>>>eugenetuyiz...@gmail.com
>>>
>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>
>>> --
>>> 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 django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.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 django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene.tuyiz...@aims-cameroon.org
>eugenetuyiz...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABxpZHsJ9%3DE-cQX4iNQxc8ztP2Hcd%3DC4stZfA3KhMwXrTekxjQ%40mail.gmail.com
> 
> .
>


-- 
Thiago Luiz Parolin

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANbmKyvfMe8d1uekPSCqjr_Mf5eqpSnU3zFBXZcfDVt7XMzNjw%40mail.gmail.com.


Re: Django Search Between 2 Dates

2021-02-03 Thread Steven Mapes
Are you looking at client-side filtering within datatables or server side 
filtering? Thiago's suggestion related to using filters when you fetch the 
queryset 
(https://docs.djangoproject.com/en/3.1/topics/db/queries/#retrieving-specific-objects-with-filters)

On Wednesday, 3 February 2021 at 13:24:40 UTC eugenet...@gmail.com wrote:

> Dear Thiago,
>
> Can I have some documentations or sample codes please?
>
> On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin  
> wrote:
>
>> Hi...
>> Normally i use field__lte and field__gte 
>>
>> Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE  
>> escreveu:
>>
>>> Dear Team,
>>>
>>> I need help. I have a list of Items in a table. And I want to filter 
>>> some data between dates (start and end date). Please help me to do a search 
>>> between the two date. I am using Data table but I can use the other way if 
>>> possible for this purpose.
>>>
>>> Regards, 
>>>
>>> -- 
>>> *TUYIZERE Eugene*
>>>
>>>
>>>
>>> *Msc Degree in Mathematical Science*
>>>
>>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
>>> Garden-Lime, Cameroon*
>>>
>>> Bsc in Computer Science
>>>
>>> *UR-Nyagatare Campus*
>>>
>>> Email: eugene@aims-cameroon.org
>>>eugenet...@gmail.com
>>>
>>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>>
>>> -- 
>>> 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 django-users...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.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 django-users...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
>>  
>> 
>> .
>>
>
>
> -- 
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal 
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene@aims-cameroon.org
>eugenet...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/98702a6a-6341-4495-b879-977e7447c6f8n%40googlegroups.com.


Re: Django Search Between 2 Dates

2021-02-03 Thread Eugene TUYIZERE
Dear Thiago,

Can I have some documentations or sample codes please?

On Wed, 3 Feb 2021 at 15:16, Thiago Luiz Parolin 
wrote:

> Hi...
> Normally i use field__lte and field__gte
>
> Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
> escreveu:
>
>> Dear Team,
>>
>> I need help. I have a list of Items in a table. And I want to filter some
>> data between dates (start and end date). Please help me to do a search
>> between the two date. I am using Data table but I can use the other way if
>> possible for this purpose.
>>
>> Regards,
>>
>> --
>> *TUYIZERE Eugene*
>>
>>
>>
>> *Msc Degree in Mathematical Science*
>>
>> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
>> Garden-Lime, Cameroon*
>>
>> Bsc in Computer Science
>>
>> *UR-Nyagatare Campus*
>>
>> Email: eugene.tuyiz...@aims-cameroon.org
>>eugenetuyiz...@gmail.com
>>
>> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>>
>> --
>> 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 django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com
> 
> .
>


-- 
*TUYIZERE Eugene*



*Msc Degree in Mathematical Science*

*African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
Garden-Lime, Cameroon*

Bsc in Computer Science

*UR-Nyagatare Campus*

Email: eugene.tuyiz...@aims-cameroon.org
   eugenetuyiz...@gmail.com

Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABxpZHsJ9%3DE-cQX4iNQxc8ztP2Hcd%3DC4stZfA3KhMwXrTekxjQ%40mail.gmail.com.


Re: Django Search Between 2 Dates

2021-02-03 Thread Thiago Luiz Parolin
Hi...
Normally i use field__lte and field__gte

Em qua, 3 de fev de 2021 08:11, Eugene TUYIZERE 
escreveu:

> Dear Team,
>
> I need help. I have a list of Items in a table. And I want to filter some
> data between dates (start and end date). Please help me to do a search
> between the two date. I am using Data table but I can use the other way if
> possible for this purpose.
>
> Regards,
>
> --
> *TUYIZERE Eugene*
>
>
>
> *Msc Degree in Mathematical Science*
>
> *African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
> Garden-Lime, Cameroon*
>
> Bsc in Computer Science
>
> *UR-Nyagatare Campus*
>
> Email: eugene.tuyiz...@aims-cameroon.org
>eugenetuyiz...@gmail.com
>
> Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANbmKytQ%3D1hiSQyj5%2Bkj-Dvy2Tk%2B0YUukORMui0cP7BPwXNZdg%40mail.gmail.com.


Django Search Between 2 Dates

2021-02-03 Thread Eugene TUYIZERE
Dear Team,

I need help. I have a list of Items in a table. And I want to filter some
data between dates (start and end date). Please help me to do a search
between the two date. I am using Data table but I can use the other way if
possible for this purpose.

Regards,

-- 
*TUYIZERE Eugene*



*Msc Degree in Mathematical Science*

*African Institute for Mathematical Sciences (AIMS Cameroon)Crystal
Garden-Lime, Cameroon*

Bsc in Computer Science

*UR-Nyagatare Campus*

Email: eugene.tuyiz...@aims-cameroon.org
   eugenetuyiz...@gmail.com

Tel: (+250) 7 88 26 33 38, (+250) 7 22 26 33 38

-- 
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABxpZHuPozCVEUFjWFYxipwTyGrY9Syyw-Et%2B_NAqXn6GevNow%40mail.gmail.com.