From 387ada23d60be7ac68f77a03f469c70898745d12 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Tue, 18 Jan 2022 16:28:26 +0700 Subject: [PATCH] Refactor code --- dmoj/urls.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dmoj/urls.py b/dmoj/urls.py index 70fa053..ecc17b9 100644 --- a/dmoj/urls.py +++ b/dmoj/urls.py @@ -1,4 +1,4 @@ -from chat_box.views import * +import chat_box.views as chat from django.conf import settings from django.conf.urls import include, url @@ -377,16 +377,16 @@ urlpatterns = [ url(r'^custom_checker_sample/', about.custom_checker_sample, name='custom_checker_sample'), url(r'^chat/', include([ - url(r'^(?P\d*)$', login_required(ChatView.as_view()), name='chat'), - url(r'^delete/$', delete_message, name='delete_chat_message'), - url(r'^post/$', post_message, name='post_chat_message'), - url(r'^ajax$', chat_message_ajax, name='chat_message_ajax'), - url(r'^online_status/ajax$', online_status_ajax, name='online_status_ajax'), - url(r'^get_or_create_room$', get_or_create_room, name='get_or_create_room'), - url(r'^update_last_seen$', update_last_seen, name='update_last_seen'), - url(r'^online_status/user/ajax$', user_online_status_ajax, name='user_online_status_ajax'), - url(r'^toggle_ignore/(?P\d+)$', toggle_ignore, name='toggle_ignore'), - url(r'^get_unread_boxes$', get_unread_boxes, name='get_unread_boxes'), + url(r'^(?P\d*)$', login_required(chat.ChatView.as_view()), name='chat'), + url(r'^delete/$', chat.delete_message, name='delete_chat_message'), + url(r'^post/$', chat.post_message, name='post_chat_message'), + url(r'^ajax$', chat.chat_message_ajax, name='chat_message_ajax'), + url(r'^online_status/ajax$', chat.online_status_ajax, name='online_status_ajax'), + url(r'^get_or_create_room$', chat.get_or_create_room, name='get_or_create_room'), + url(r'^update_last_seen$', chat.update_last_seen, name='update_last_seen'), + url(r'^online_status/user/ajax$', chat.user_online_status_ajax, name='user_online_status_ajax'), + url(r'^toggle_ignore/(?P\d+)$', chat.toggle_ignore, name='toggle_ignore'), + url(r'^get_unread_boxes$', chat.get_unread_boxes, name='get_unread_boxes'), ])), url(r'^notifications/',