Exemplo n.º 1
0
__author__ = "akhtar"

from django.urls import path

from chat.views import ChatView, ConversationView


urlpatterns = [
    path('conversation/<int:pk>', ConversationView.as_view()),
    path('chat/', ChatView.as_view()),
]
Exemplo n.º 2
0
"""chatmessage URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from chat.views import LoginView, ChatView, LogOutView, SignUpView

urlpatterns = [
    url(r'^$', LoginView.as_view(), name="login"),
    url(r'^signup/$', SignUpView.as_view(), name="signup"),
    url(r'^logout/$', LogOutView.as_view(), name ="logout" ),
    url(r'^home/(?P<user_id>\d+)/$', ChatView.as_view(), name="user_list"),
    url(r'^home/$', ChatView.as_view(), name="home"),
    url(r'^admin/', include(admin.site.urls)),
]
Exemplo n.º 3
0
from forums.views import (
    ForumView,
    LastForumMessageView,
    SubscribeForumView,
    UnsubscribeForumView,
    ForumRequestView,
    ForumReportView,
    ForumsView,
)

from inbox.views import GetInbox

urlpatterns = [
    url(r'^accounts/', include('allauth.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^api/inbox/$',GetInbox.as_view()),
    url(r'^api/chat/messages/(?P<id>[0-9]+)/$', ChatView.as_view()),#conversation id
    url(r'^api/chat/conversation/(?P<id>[0-9]+)/$', AddOrGetConversationView.as_view()),
    url(r'^api/chat/inbox/$', LatestConversationMessageView.as_view()),
    url(r'^chat/conversation/$', TemplateTestView.as_view()),
    url(r'^api/forum/(?P<id>[0-9]+)/$',ForumView.as_view()),
    url(r'^api/forums/$',ForumsView.as_view()),
    url(r'^api/forum/inbox/$',LastForumMessageView.as_view()),
    url(r'^api/forum/subscribe/(?P<id>[0-9]+)/$',SubscribeForumView.as_view()),
    url(r'^api/forum/unsubscribe/(?P<id>[0-9]+)/$',UnsubscribeForumView.as_view()),
    url(r'^api/forum/request/$',ForumRequestView.as_view()),
    url(r'^api/forum/report/(?P<id>[0-9]+)/$',ForumReportView.as_view()),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
]
Exemplo n.º 4
0
from django.urls import path
from . import views
from chat.views import ChatView
from django.views.decorators.csrf import csrf_exempt

urlpatterns = [
    path('/profile', views.profile),
    path('/profile/edit', csrf_exempt(ChatView.as_view())),
    path('/message', views.message)
]
Exemplo n.º 5
0
"""chatrealtime URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.contrib.auth import views as auth_views
from django.urls import path

from chat.views import ChatView, HomeView, ChatAPIView

urlpatterns = [
    path('', HomeView.as_view(), name='home'),
    path('chat/<slug:chatname>/', ChatView.as_view(), name='chat'),
    path('login/', auth_views.LoginView.as_view(), name='login'),
    path('logout/', auth_views.LogoutView.as_view(), name='logout'),
    path('api/messages/<slug:chatname>/',
         ChatAPIView.as_view(),
         name="messages"),
    path('admin/', admin.site.urls),
]
Exemplo n.º 6
0
from django.conf.urls import url

from chat.views import ChatView
from . import views

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^(?P<room_name>[^/]+)/$', ChatView.as_view(), name='room'),
]
Exemplo n.º 7
0
from django.conf.urls import patterns, include, url
from chat.views import ChatView, LoginView

urlpatterns = patterns('',
    url(r'^$', ChatView.as_view(), name="chat"),
    url(r'^login$', LoginView.as_view(), name="chat-login"),
)
Exemplo n.º 8
0
from django.urls import path, re_path

from chat.views import ChatView, MessageListView

urlpatterns = [
    path('message/', ChatView.as_view()),
    path('message/list', MessageListView.as_view())
]
Exemplo n.º 9
0
from django.conf.urls import url

from chat.views import ChatView, query_chat_view, ChatRooms

urlpatterns = [
    url(r'^(?P<pk>[0-9]+)/$', ChatView.as_view(), name="chat"),
    url(r'^list/$', ChatRooms.as_view(), name="chatrooms"),
    url(r'^query/$', query_chat_view, name="new-chat"),
]
Exemplo n.º 10
0
"""django_chat URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.views.generic import RedirectView

from chat.views import ChatView, send_email

urlpatterns = [
    url(r'^$', RedirectView.as_view(url='/chat/'), name='home'),
    url(r'chat/$', ChatView.as_view(), name='chat'),
    url(r'email/$', send_email, name='send_email'),
    url(r'^admin/', admin.site.urls),
]
Exemplo n.º 11
0
from django.urls import path

from chat.views import ChatView, room

urlpatterns = [
    path('', ChatView.as_view(), name='index'),
    path('<str:room_name>/', room, name='room'),
]
Exemplo n.º 12
0
from django.urls import path

from chat.views import ChatView, CreateMessageView, MessageView

urlpatterns = [
    path('', ChatView.as_view(), name='chat'),
    path('add/', CreateMessageView.as_view(), name='add'),
    path('entry/', MessageView.as_view(), name='typing'),
]
Exemplo n.º 13
0
from django.contrib import admin
from django.urls import path
from chat.views import ChatView, ConversationView

app_name = 'chat'
urlpatterns = [
    path('chat/', ChatView.as_view(), name='chat_page'),
    path('chat/<str:sender>/',
         ConversationView.as_view(),
         name='chat_conversation'),
]
Exemplo n.º 14
0
from django.urls import path, re_path
from chat.views import ChatView

app_name = 'chat'

urlpatterns = [
	re_path(r'^(?P<room_name>[^/]+)/$', ChatView.as_view(), name='chat'),
]
Exemplo n.º 15
0
from django.conf.urls import url
from django.urls import path

from chat.views import ChatView, MyLoginView, ChatLoginView, MessageCreateView, ChatLogoutView, ChatRegistrationView, \
    MessagesView

urlpatterns = [
    url(r'get$', ChatView.as_view(), name='chat_get'),
    # path('login/<int:user_id>/',MyLoginView.as_view()
    path('login/', MyLoginView.as_view(), name='login'),
    path('logout/', ChatLogoutView.as_view(), name='logout'),
    path('easy_login/', ChatLoginView.as_view(), name='easy_login'),
    path('message_create/', MessageCreateView.as_view(), name='message_create'),
    path('registration/', ChatRegistrationView.as_view(), name='registration'),
    path('messages/', MessagesView.as_view(), name='messages')
]