Simplify chat views
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
a121d1042b
commit
181bb86e49
|
@ -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'),
|
||||
]
|
||||
|
|
|
@ -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")}
|
Loading…
Reference in New Issue