Skip to content

Commit 9d1b72f

Browse files
committed
basic urls.py reorder
1 parent 7232b8d commit 9d1b72f

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

classroom/urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
path('create/', views.CreateClassroomView.as_view(), name='create_classroom'),
88
path('join/', views.JoinClassroomView.as_view(), name='join_classroom'),
99
path('user/', views.GetUserClassroomView.as_view(), name='user_classroom'),
10+
1011
path('channels/', views.GetClassroomChannelsView.as_view(), name='channels_classroom'),
12+
path('channel/add', views.CreateChannelView.as_view(), name='channel_add_classroom'),
13+
1114
path('messages/', views.GetChannelMessagesView.as_view(), name='messages_classroom'),
12-
path('channel/add', views.CreateChannelView.as_view(), name='channel_classroom'),
1315
# path('<slug:code>/<slug:channel>', views.classroom, name='classroom'),
1416
]

manthano_backend/settings.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# SECURITY WARNING: don"t run with debug turned on in production!
3030
DEBUG = True
3131

32-
ALLOWED_HOSTS = []
32+
ALLOWED_HOSTS = ['*']
3333

3434
# Application definition
3535

@@ -85,16 +85,16 @@
8585

8686
ROOT_URLCONF = "manthano_backend.urls"
8787

88-
CORS_ORIGIN_ALLOW_ALL = False
88+
CORS_ORIGIN_ALLOW_ALL = True
8989
CORS_ALLOW_CREDENTIALS = True
90-
CORS_ALLOWED_ORIGINS = [
91-
"http://localhost:5173",
92-
"http://127.0.0.1:5173",
93-
]
94-
CORS_ORIGIN_WHITELIST = (
95-
'http://localhost:5173',
96-
'http://127.0.0.1:5173',
97-
)
90+
# CORS_ALLOWED_ORIGINS = [
91+
# "http://localhost",
92+
# "http://127.0.0.1",
93+
# ]
94+
# CORS_ORIGIN_WHITELIST = (
95+
# 'http://localhost',
96+
# 'http://127.0.0.1',
97+
# )
9898

9999
TEMPLATES = [
100100
{

0 commit comments

Comments
 (0)