goes with more or less the same check..... whenever a record is displayed 
(pressing the "view" button) , there's a 'view' in request.args.

On Friday, April 19, 2013 9:02:41 PM UTC+2, Alex Glaros wrote:
>
> Here is the controller:
>
> def search_shared_services():
>     grid = SQLFORM.smartgrid(db.SharedService, linked_tables=[
> 'SharedServicePartnerIntersection'],
>     maxtextlength={'SharedServicePartnerIntersection.sharedServiceID':140, 
> 'SharedService.shortSharedServiceTitle':140,
> 'SharedService.shortSharedServiceDescription':140})
>     return dict(grid=grid)
>
>
> On Friday, April 19, 2013 11:29:40 AM UTC-7, Niphlod wrote:
>>
>> grid:
>>
>> if request.args(-3) == 'view':
>>      add +1 
>>
>> factory: you know that already, you have to pass it
>> crud: same as factory
>> sqlform : same as factory
>>
>> What's the issue ?
>>
>> On Friday, April 19, 2013 7:19:19 PM UTC+2, Alex Glaros wrote:
>>>
>>> I want to count how many web users have looked at a record.
>>>
>>> If a user uses a web2py form (sqlform, factory, crud, etc.) to search 
>>> for a record, and then opens and views that record, how can I keep track of 
>>> that view?
>>>
>>> I'd like to keep a total count of the number of times the record was 
>>> viewed.
>>>
>>> Thanks,
>>>
>>> Alex Glaros
>>>
>>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to