def home(request): if not request.user.is_authenticated: return redirect(login) return render(request, "home.html", {'photos': trainer.get_nbr_photos(), 'users': User.objects.count(), 'last_training': utility.last_training()}, )
def are_there_photos(): return True if trainer.get_nbr_photos() > 0 else False
def home(request): return render(request, "home.html", {'photos': trainer.get_nbr_photos(), 'users': User.objects.count(), 'last_training': utility.last_training()}, )