This repository has been archived on 2023-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
takahe/core/views.py
Andrew Godwin 34b24a0dcb More UI!
2022-11-13 16:15:14 -07:00

22 lines
487 B
Python

from django.views.generic import TemplateView
from activities.views.timelines 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),
}