Re: channels/asgi 3.x imcompatibility with the code on 2.x versions

2021-12-02 Thread Zhaoxun Yan
So far as our code and the code of another user, we have passed self as the first argument in the definition of a function/method. relating code in consumers.py: from channels.generic.websocket import AsyncWebsocketConsumer import json class Trade(AsyncWebsocketConsumer): async def my_send(se

channels/asgi 3.x imcompatibility with the code on 2.x versions

2021-11-30 Thread Zhaoxun Yan
Hi there! I have posted this issue like 3 months ago. https://github.com/django/channels/discussions/1736 And there are many others encountering similar problem, like this: https://stackoverflow.com/questions/68194577/typeerror-call-missing-1-required-positional-argument-send-django/ The similar

Fail to create Django registration form with email and password only

2018-08-19 Thread Yan Cheng Cheok
Creating basic registration/ authentication in Django is insanely hard. After many tries, I manage to create basic registration/ authentication in Django using username and password. [image: enter image description here] The code is shown in https://gi

Template Django - Can't display model field in Django Template

2016-06-08 Thread Yan L'kabousse
Hello everyone :) I want to display some datas on a wtih Django Template. I have menus (for eat in reaturant) But I can't display the menuItems in the But it displays other parts of the table. Here is my stackoverflow topic if you want more details (model for example) : http://stackoverflow

Re: "Authenticating Users" where should I put the code?

2014-03-06 Thread Jack Yan
Thank you :) On Friday, March 7, 2014 12:13:26 AM UTC+8, Felipe Coelho wrote: > > 2014-03-06 11:45 GMT-03:00 Jack Yan >: > >> in the tutorial and section "Authenticating Users": >> https://docs.djangoproject.com/en/1.6/topics/auth/default/ >

"Authenticating Users" where should I put the code?

2014-03-06 Thread Jack Yan
in the tutorial and section "Authenticating Users": https://docs.djangoproject.com/en/1.6/topics/auth/default/ where can I put code: from django.contrib.auth import authenticateuser = authenticate(username='john', password='secret')if user is not None: # the password verified for the user

Re: How to display Chinese in django webpage

2013-08-03 Thread zhao yan
Dear Lukas: Thank you! Cheers :) Zhao 在 2013年8月1日星期四UTC+8下午8时51分55秒,Lukáš Němec写道: > > Hi > > I'd suggest you to contact the developers of Zinnia blog, > they should be able to help you easily > > Cheers :) > Lukas > > On 08/01/2013 10:50 AM, zhao

How to display Chinese in django webpage

2013-08-01 Thread zhao yan
HELLO: I am a new django user I want to display Chinese in my webpage but it can't this is my settings.py: - TIME_ZONE = 'Asia/Shanghai' USE_TZ = True USE_I18N = True USE_L10N = True LANGUAGE_CODE = 'zh-cn' LANGUAGES = ( ('zh_CN', gettext('S

django and profile pictures creation

2011-11-03 Thread yan
Hello, I am developing a website which will have some social features like people profiles, but I am having a problem on how to create a space where a person will put his/her profile picture, I am using django framework and MySQL, can anyone help me please? -- You received this message because yo