I
I
ILoveYAnny2016-01-19 13:20:55
Django
ILoveYAnny, 2016-01-19 13:20:55

How to define the first visit of a session in a template?

Good afternoon friends. The task is painfully simple, you need to understand whether the person came in for the first time, and if the first time, then print the styles and run the script. So I think we need some kind of statement like {% if user.is_authenticated %}. Please help me to fill in the gap in knowledge, recently moved from PHP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zelsky, 2016-01-19
@zelsky

profile.user.last_login check if empty then first time

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question