-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathurls.py
More file actions
29 lines (26 loc) · 955 Bytes
/
urls.py
File metadata and controls
29 lines (26 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('Chat.views',
(r'^$', 'main_page', {'email': 'email'}),
(r'^main/$', 'main_page', {'email': 'email'}),
(r'^logout_user/$', 'logout_user'),
(r'^login/$', 'login_user'),
(r'^admin/', include(admin.site.urls)),
(r'^register/$', 'view_regiser'),
(r'^create-room/$', 'create_room'),
(r'^autch/' , 'autch'),
url(r'^chat-room/(?P<id>\d+)/$', 'chat_room_details', name = 'chat_room_details'),
(r'^send-message/$', 'send_message'),
(r'^update-message/$', 'update_message'),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^%s/(?P<path>.*)$' % settings.MEDIA_URL.strip('/'),
'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)