gettext vs ugettext_lazy

2021-12-02 Thread ngallen4
Hello Would like to know, what are the difference between gettext and ugettext_lazy? When to use each of them? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Can't able to accept the friend request in my django website

2021-12-02 Thread Kasper Laudrup
https://www.propublica.org/nerds/how-to-ask-programming-questions -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To v

Can't able to accept the friend request in my django website

2021-12-02 Thread Rohan buks
I'm getting the following error: Environment: Request Method: GET Request URL: http://127.0.0.1:8000/users/friend-request/accept/7/ Django Version: 2.1 Python Version: 3.8.10 Installed Applications: ['users.apps.UsersConfig', 'feed.apps.FeedConfig', 'crispy_forms', 'stdimage', 'django.contr

Re: Use previous requested data in the new request

2021-12-02 Thread kayhan
Because first the site user allows us to access their location information. And then we use JavaScript code to get his location and send it to Django. The user then fills out another form and sends it to Django. When this form is submitted, we use the information in this form and the location infor

Re: gettext vs ugettext lazy

2021-12-02 Thread Aldian Fazrihady
Use the lazy version when you know that the translation database won't be ready when the gettext function is invoked, such as in the class variable initialization. Use the non-lazy version when you know the translation database is ready, such as inside a method. https://docs.djangoproject.com/en/

gettext vs ugettext lazy

2021-12-02 Thread ngal...@gmail.com
Hello Would like to know the difference and where to use .Model, Views, Routers, Forms e.t.c gettext (from django.utils.translation import gettext) ugettext_lazy(from django.utils.translation import ugettext_lazy) -- You received this message because you are subscribed to the Google Groups "Dja

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