Hi Andreas,
Thanks for your response. I want to clarify below points --
Above mentioned suggested code should be written in which file ?
How Logging output can be published on admin console ?
Thanks again --

On Tue, Jul 23, 2019 at 12:39 AM Andreas Schosser <[email protected]> wrote:

> Hi
>
> you can the use Logger class documented in
> "https://docs.djangoproject.com/en/2.2/topics/logging/";.
>
> Basically the code is something like
>
>   import logging
>   log = logging.getLogger('delhisanjays_app')
>   log.info.('user logged in')
>
> You can enhance the log message to your needs.
>
> Cheers
>
> Am 22.07.19 um 19:27 schrieb SNJY G:
> > Hello Django Experts,
> > There is Django application which uses LDAP in middleware for user
> > authentication.
> > I need to record user login and logout time. For that purpose, I think
> of a
> > basic flow as per following details -
> > Create new model for logging
> > Make a function in views.py which will add the login/ logout time and
> date
> > to a model.
> > Call the function every time when user login/ logout.
> > Could someone please suggest better way OR point me to good/relevant
> > article around it.
> --
> Kurs 10 IT-Consulting                           www.kurs-10.de
> Andreas Schosser                                  [email protected]
>
> Baldestraße. 14                      Telefon +49 89 41615842-0
> 80469 München                        Telefax +49 89 41615842-3
>
> 0x85475B6B - 79BB 94F9 8523 0180 E2E5 7A8F 97B7 5BAB 8547 5B6B
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7f6d92a7-9ef0-66d7-f07e-51463a99ba3c%40kurs-10.de
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG6zOKWtJ_68unMqs0M_p8Npxw0gZVg53q9MX1r1xU1mGSuB%3Dw%40mail.gmail.com.

Reply via email to