Re: user visit count

2020-04-16 Thread Motaz Hejaze
Great

On Thu, 16 Apr 2020, 6:53 am shreehari Vaasistha L, 
wrote:

> Done
>
> On Wednesday, April 15, 2020 at 6:55:37 PM UTC+5:30, Motaz Hejaze wrote:
>>
>> no standard for this , but thinking out loud with you ..
>>
>> you can make a many to many model ( table ) of 3 columns , first column
>> will be user id , second column will be object id , third column will be
>> number of visits ( integer  initial value 0 ) ,  every time the object view
>> is called you'll query the table for object.id if not found ( for first
>> time , create a new row with this object.id and request.user.id and put
>> number_of_visits column  = 1 ) , if found then filter by user.id , if
>> found increase number in number_of_visits column by one , if filter not
>> returning thing then create a new row with object.id and user.id and put
>> number_of_visits column  = 1
>>
>> On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L <
>> shreeh...@gmail.com> wrote:
>>
>>> Thank you!
>>> But can there be any simple implementation as i just want to count
>>> number of times a user has viewed a post
>>>
>>> On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote:

 I'm planning to use django-hitcount too, but please be aware that it's
 not yet compatible with Django 3.x. There's a patch that needs to be
 applied and a release forthcoming that should take care of it.

 -Tim

 On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:

 Django hit count package will help you..

 On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L <
 shreeh...@gmail.com> wrote:

 how can i get the number of views of an endpoint by a single user.


 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/b9e434ba-8378-45cb-a67f-b344773340b6%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 django...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
 
 .


 --
 Tim Wilson
 President, Savvy Technology Group
 phone: 612-599-5470

 --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/36fd6a9b-e959-49ee-9183-f18c26daf1c9%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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9c1ca4ac-5b9d-4a87-811f-185f539c6de7%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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-fsBxq-OM2j1x8or9eyjKhw85aXhY_SFu9Y4E9BUY1-nQ%40mail.gmail.com.


Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
Done

On Wednesday, April 15, 2020 at 6:55:37 PM UTC+5:30, Motaz Hejaze wrote:
>
> no standard for this , but thinking out loud with you ..
>
> you can make a many to many model ( table ) of 3 columns , first column 
> will be user id , second column will be object id , third column will be 
> number of visits ( integer  initial value 0 ) ,  every time the object view 
> is called you'll query the table for object.id if not found ( for first 
> time , create a new row with this object.id and request.user.id and put 
> number_of_visits column  = 1 ) , if found then filter by user.id , if 
> found increase number in number_of_visits column by one , if filter not 
> returning thing then create a new row with object.id and user.id and put 
> number_of_visits column  = 1
>
> On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L  > wrote:
>
>> Thank you!
>> But can there be any simple implementation as i just want to count number 
>> of times a user has viewed a post
>>
>> On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote:
>>>
>>> I'm planning to use django-hitcount too, but please be aware that it's 
>>> not yet compatible with Django 3.x. There's a patch that needs to be 
>>> applied and a release forthcoming that should take care of it.
>>>
>>> -Tim
>>>
>>> On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:
>>>
>>> Django hit count package will help you..
>>>
>>> On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L  
>>> wrote:
>>>
>>> how can i get the number of views of an endpoint by a single user.
>>>
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/b9e434ba-8378-45cb-a67f-b344773340b6%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 django...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>>>
>>> -- 
>>> Tim Wilson
>>> President, Savvy Technology Group
>>> phone: 612-599-5470
>>>
>>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/36fd6a9b-e959-49ee-9183-f18c26daf1c9%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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9c1ca4ac-5b9d-4a87-811f-185f539c6de7%40googlegroups.com.


Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
cool man
i was trying exactly the same thing... if you try to get it work then post 
it here please.

On Wednesday, April 15, 2020 at 6:55:37 PM UTC+5:30, Motaz Hejaze wrote:
>
> no standard for this , but thinking out loud with you ..
>
> you can make a many to many model ( table ) of 3 columns , first column 
> will be user id , second column will be object id , third column will be 
> number of visits ( integer  initial value 0 ) ,  every time the object view 
> is called you'll query the table for object.id if not found ( for first 
> time , create a new row with this object.id and request.user.id and put 
> number_of_visits column  = 1 ) , if found then filter by user.id , if 
> found increase number in number_of_visits column by one , if filter not 
> returning thing then create a new row with object.id and user.id and put 
> number_of_visits column  = 1
>
> On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L  > wrote:
>
>> Thank you!
>> But can there be any simple implementation as i just want to count number 
>> of times a user has viewed a post
>>
>> On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote:
>>>
>>> I'm planning to use django-hitcount too, but please be aware that it's 
>>> not yet compatible with Django 3.x. There's a patch that needs to be 
>>> applied and a release forthcoming that should take care of it.
>>>
>>> -Tim
>>>
>>> On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:
>>>
>>> Django hit count package will help you..
>>>
>>> On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L  
>>> wrote:
>>>
>>> how can i get the number of views of an endpoint by a single user.
>>>
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/b9e434ba-8378-45cb-a67f-b344773340b6%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 django...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>>>
>>> -- 
>>> Tim Wilson
>>> President, Savvy Technology Group
>>> phone: 612-599-5470
>>>
>>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/36fd6a9b-e959-49ee-9183-f18c26daf1c9%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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1030889f-25f8-49d7-b026-e0d715d2891f%40googlegroups.com.


Re: user visit count

2020-04-15 Thread Motaz Hejaze
no standard for this , but thinking out loud with you ..

you can make a many to many model ( table ) of 3 columns , first column
will be user id , second column will be object id , third column will be
number of visits ( integer  initial value 0 ) ,  every time the object view
is called you'll query the table for object.id if not found ( for first
time , create a new row with this object.id and request.user.id and put
number_of_visits column  = 1 ) , if found then filter by user.id , if found
increase number in number_of_visits column by one , if filter not returning
thing then create a new row with object.id and user.id and put
number_of_visits column  = 1

On Wed, Apr 15, 2020 at 2:29 PM shreehari Vaasistha L <
shreehari9...@gmail.com> wrote:

> Thank you!
> But can there be any simple implementation as i just want to count number
> of times a user has viewed a post
>
> On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote:
>>
>> I'm planning to use django-hitcount too, but please be aware that it's
>> not yet compatible with Django 3.x. There's a patch that needs to be
>> applied and a release forthcoming that should take care of it.
>>
>> -Tim
>>
>> On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:
>>
>> Django hit count package will help you..
>>
>> On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L 
>> wrote:
>>
>> how can i get the number of views of an endpoint by a single user.
>>
>>
>> --
>> 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...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b9e434ba-8378-45cb-a67f-b344773340b6%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 django...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
>> 
>> .
>>
>>
>> --
>> Tim Wilson
>> President, Savvy Technology Group
>> phone: 612-599-5470
>>
>> --
> 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/36fd6a9b-e959-49ee-9183-f18c26daf1c9%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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-c6AkWw%2Bk1jkVioQBYgAMxNaTTUECbezWWiz3iKQrYFYw%40mail.gmail.com.


Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
Thank you!
But can there be any simple implementation as i just want to count number 
of times a user has viewed a post

On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote:
>
> I'm planning to use django-hitcount too, but please be aware that it's not 
> yet compatible with Django 3.x. There's a patch that needs to be applied 
> and a release forthcoming that should take care of it.
>
> -Tim
>
> On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:
>
> Django hit count package will help you..
>
> On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L  > wrote:
>
> how can i get the number of views of an endpoint by a single user.
>
>
> --
> 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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/b9e434ba-8378-45cb-a67f-b344773340b6%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 django...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
>  
> 
> .
>
>
> -- 
> Tim Wilson
> President, Savvy Technology Group
> phone: 612-599-5470
>
>

-- 
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/36fd6a9b-e959-49ee-9183-f18c26daf1c9%40googlegroups.com.


Re: user visit count

2020-04-15 Thread shreehari Vaasistha L
I'm using django 3.x.
Anyother simple implementation ?
i just want to get number of times a particular user has viewed an object.

On Wednesday, April 15, 2020 at 5:48:36 PM UTC+5:30, Tim Wilson wrote:
>
> I'm planning to use django-hitcount too, but please be aware that it's not 
> yet compatible with Django 3.x. There's a patch that needs to be applied 
> and a release forthcoming that should take care of it.
>
> -Tim
>
> On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:
>
> Django hit count package will help you..
>
> On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L  > wrote:
>
> how can i get the number of views of an endpoint by a single user.
>
>
> --
> 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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/b9e434ba-8378-45cb-a67f-b344773340b6%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 django...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
>  
> 
> .
>
>
> -- 
> Tim Wilson
> President, Savvy Technology Group
> phone: 612-599-5470
>
>

-- 
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/ad0c493d-1e92-496a-924b-609819cb848d%40googlegroups.com.


Re: user visit count

2020-04-15 Thread Tim Wilson
I'm planning to use django-hitcount too, but please be aware that it's not yet 
compatible with Django 3.x. There's a patch that needs to be applied and a 
release forthcoming that should take care of it.

-Tim

On Wed, Apr 15, 2020, at 4:38 AM, Omkar Parab wrote:
> Django hit count package will help you..
> 
> On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L  
> wrote:
>> how can i get the number of views of an endpoint by a single user.
>> 

>> --
>>  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/b9e434ba-8378-45cb-a67f-b344773340b6%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 django-users+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com
>  
> .

-- 
Tim Wilson
President, Savvy Technology Group
phone: 612-599-5470

-- 
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/602f830a-0d4d-44f5-b346-406b6b39b5db%40www.fastmail.com.


Re: user visit count

2020-04-15 Thread Omkar Parab
Django hit count package will help you..

On Wed, Apr 15, 2020, 1:09 PM shreehari Vaasistha L 
wrote:

> how can i get the number of views of an endpoint by a single user.
>
> --
> 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/b9e434ba-8378-45cb-a67f-b344773340b6%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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJY8mfxe%3Dgx4YnJj_%2BWLuVD-iTaeNy0BhMR4U1_bAXa93ObAMg%40mail.gmail.com.