diff --git a/chat/urls.py b/chat/urls.py index c47f175..72465fc 100644 --- a/chat/urls.py +++ b/chat/urls.py @@ -2,14 +2,13 @@ # SPDX-License-Identifier: GPL-3.0-or-later from django.urls import path +from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView -from .views import ChatView - app_name = 'chat' urlpatterns = [ - path('', ChatView.as_view(), name='chat'), + path('', TemplateView.as_view(template_name="chat/chat.html", extra_context={'title': _("Chat")}), name='chat'), path('fullscreen/', TemplateView.as_view(template_name="chat/fullscreen.html"), name='fullscreen'), ] diff --git a/chat/views.py b/chat/views.py deleted file mode 100644 index 8706d3b..0000000 --- a/chat/views.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2024 by Animath -# SPDX-License-Identifier: GPL-3.0-or-later - -from django.contrib.auth.mixins import LoginRequiredMixin -from django.utils.translation import gettext_lazy as _ -from django.views.generic import TemplateView - - -class ChatView(LoginRequiredMixin, TemplateView): - """ - This view is the main interface of the chat system, which is working - with Javascript and websockets. - """ - template_name = "chat/chat.html" - extra_context = {'title': _("Chat")}