blob: dbaebf9ecaa25c46af8ea9a4a7d30487621e2e78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
from django.views.generic import TemplateView
from statuses.views.home import Home
from users.models import Identity
def homepage(request):
if request.user.is_authenticated:
return Home.as_view()(request)
else:
return LoggedOutHomepage.as_view()(request)
class LoggedOutHomepage(TemplateView):
template_name = "index.html"
def get_context_data(self):
return {
"identities": Identity.objects.filter(local=True),
}
|