Sanjeeb
this is the error
Sanjeeb
projects url code
Sanjeeb
from django.contrib import adminfrom django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('food/', include('food.urls')), ]
Sanjeeb
from . import views from django.urls import path urlpatterns = [ path('hello/', views.hello_world, name='hello'), ]
Виктор
And please, use markdown formation, looks better
Sanjeeb
i tried also that not work
Виктор
i tried also that not work
What happened? 404 or another code?
Sanjeeb
http://localhost:8000/food/hello/
Sanjeeb
Page not found (404)Request Method: GET Request URL: http://localhost:8000/food/hello/Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: admin/ The current path, food/hello/, didn’t match any of these. You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
Sanjeeb
404 is comming
Sanjeeb
Виктор
what is the issue bro
Sorry, im not ur bro, but u can share project to public repository, isn't popular mistake
Виктор
Is python manage.py runserver 80? Check pls port
Sanjeeb
It's only python manage.py runsrver
Виктор
How u get 404?)
Sanjeeb
Whe i search for normal lacalhost://8000 it's work
Sanjeeb
Django project showing
Виктор
Ur /food/hello/ not return 404 response from view?
Виктор
Виктор
https://dpaste.org/TBjc3
51 string is bad now
Виктор
Hello admin, I have a question: I know django, and I want to help people in the group, but my English is weak. Can I practice it here in group, trying to help people?
Азамат
Hey community!
Азамат
https://github.com/azamatovuser/Telegram-Clone-API/issues/1
Азамат
Can someone help me with websocket (django)
Виктор
Can someone help me with websocket (django)
u use proxy? and websocket connection working from client?
Виктор
ur path not right too
Азамат
im not sure i understand (my bad) i just recently started learning websocket and to be honest i cant get properly
Виктор
im not sure i understand (my bad) i just recently started learning websocket and to be honest i cant get properly
ur channel layer working? https://github.com/azamatovuser/Telegram-Clone-API/blob/c96d28acda981398073b1910320498528537d876/chat/views.py#L41 check its please
Виктор
Азамат
No, its not
Азамат
I think the code doesnt recognize the websocket part
Виктор
I think the code doesnt recognize the websocket part
Check your channel level, maybe the connection is not working, I sometimes encounter such an error because of this
Азамат
with just print methods?
Азамат
okay hold on
Виктор
with just print methods?
im check with python manage.py shell and use method from channels.layers import get_channel_layer channel_layer = get_channel_layer()
Азамат
i just added print to check and here is the result: RedisChannelLayer(hosts=[{'host': 'localhost', 'port': 8000}])
Азамат
nothing happened
Виктор
nothing happened
yes, misstake, can u check async_to_sync(channel_layer.group_send)("chat", {"type": "chat.force_disconnect"})
Азамат
yes
Азамат
yes, misstake, can u check async_to_sync(channel_layer.group_send)("chat", {"type": "chat.force_disconnect"})
The error appears: raise ConnectionError(SERVER_CLOSED_CONNECTION_ERROR) redis.exceptions.ConnectionError: Connection closed by server.
Виктор
The error appears: raise ConnectionError(SERVER_CLOSED_CONNECTION_ERROR) redis.exceptions.ConnectionError: Connection closed by server.
i think its because ur https://github.com/azamatovuser/Telegram-Clone-API/blob/c96d28acda981398073b1910320498528537d876/chat/views.py#L41 code not returing, can u comment this code and retry query?
Азамат
Sure
Азамат
async_to_sync(channel_layer.group_send)( f'room_{room.id}', { 'type': 'room_message', 'message': message } ). What about this?
Азамат
there is channel_layer
Виктор
Виктор
if query will done, its ur redis problems
Виктор
you need to localize the problem
Азамат
everything works
Азамат
no error
Азамат
How am i supposted to send?
Азамат
(channel_layer.group_send)( f'room_{1}', { 'type': 'room_message', 'message': 'message' } ) Like this?
Виктор
(channel_layer.group_send)( f'room_{1}', { 'type': 'room_message', 'message': 'message' } ) Like this?
async def test_function(): channel_layer = get_channel_layer() await channel_layer.group_send( f'room_1', { 'type': 'room_message', 'message': message } )
Азамат
Nothing happens
Азамат
when i send a number, this number is being returned
Азамат
and that accepts only number
Азамат
such a hard thing to understand (websocket)
Kridha Singh
Is anyone tell me how to convert html into pdf and how to download pdf in django? I tried many times but it gives error
Muflone
Muflone
Yaa I did the same but it gives error
Errors are made to be read from you
M. Hossein
How can I create a custom mixin? For example: EmployerGroupRequired, UserPointsRequired
Виктор
How can I create a custom mixin? For example: EmployerGroupRequired, UserPointsRequired
isn't interfaces? requires information, maybe abstract classes will do here
rahman
I Want to learn Django which is the best online platform to learn
AZAMAT 々
I Want to learn Django which is the best online platform to learn
the best platform for learning: www.djangoproject.com
Salih
hey my name is salih. now i am learning  model form in django  .i am stuck with my code so is anyone  know why my data incertion was not happening.sql data base created but insertion is not happening
Salih
Yeah sure
Charly
Yeah sure
So, are you going to share that?