Shivani
How to add functionality of remember me in django login with multiple user type
Becky
Is there any one have note about Django python
Doragonsureiyā
Is there any one have note about Django python
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Careful
How to add functionality of remember me in django login with multiple user type
https://stackoverflow.com/questions/53431476/django-how-to-implement-a-remember-me-radio-button-on-a-login-page
ניקיטוס
Hello there! I need to connect telegram bot to the django app and for now i can`t figure out what is the best way to do it. For now i see 2 options, which is using webhooks and embedding bot into the app and use it from there.
Tamerlan
I get error TypeError: object ChatConsumer can't be used in 'await' expression
Tamerlan
that is my consumer
theDisgrace
Try inheriting AsyncWebsocketConsumer instead of sync version
Tamerlan
In video author use sync version that is why i use this
Tamerlan
I am new about use channels
theDisgrace
I am new about use channels
Wherever you have made an object of this chatconsumer
theDisgrace
Maybe you've used await with it.. instead of that try using async_to_sync
theDisgrace
Or just remove await if it's not necessary
Tamerlan
i do not use await
theDisgrace
I'm not sure but I don't think the problem is in this part of code.. maybe it's view or models.. have you used the ChatConsumer in the python code anywhere?
Tamerlan
https://linkode.org/#U4BeNfTL2qVoIiLp1tGKo3
Tamerlan
In url
Asad Ullah
what does this function do on autocall? reference: https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.autodiscover
Oxytocin
Hi I have a class named notification that I want to create a notification if the m2m field of an object from another class is changed. m2m field is actually assigned users. I used Django's m2m changed signal, but it returns auth.user.None How can I get the id of added or deleted users and create a notif for them??
Garegin
hi, how to can I fix migration conflicts?
Mirco
hi, how to can I fix migration conflicts?
Delete the one added by your branch and re-generate
Maxim
hi, how to can I fix migration conflicts?
it is impossible to answer your question without knowing the details of the reasons for the situation
Garegin
Delete the one added by your branch and re-generate
i did it but still have this problem
Garegin
CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0008_alter_user_username_max_length 2, 0011_update_proxy_permissions 2, 0010_alter_group_name_max_length 2, 0007_alter_validators_add_error_messages 2, 0003_alter_user_email_max_length 2, 0004_alter_user_username_opts 2, 0009_alter_user_last_name_max_length 2, 0012_alter_user_first_name_max_length, 0005_alter_user_last_login_null 2, 0002_alter_permission_name_max_length 2, 0012_alter_user_first_name_max_length 2, 0006_require_contenttypes_0002 2 in auth; 0003_logentry_add_action_flag_choices 2, 0001_initial 2, 0002_logentry_remove_auto_add 2, 0003_logentry_add_action_flag_choices in admin; 0002_remove_content_type_name 2, 0001_initial 2, 0002_remove_content_type_name in contenttypes; 0001_initial, 0001_initial 2 in sessions). To fix them run 'python manage.py makemigrations --merge'
Maxim
i did it but still have this problem
any action could make the situation worse first of all, i would recommend not experimenting on important data
Hemraj
Is there any “approval form workflow” method in django which can be used by assigning users?
Eman
how can i solve duplicates in SQL in many to many relationship in rest framework
Eman
handle my views remove duplicates and similar queries
Charly
handle my views remove duplicates and similar queries
Which duplicates? what similar queries?
VisioN
.
Use modelname.objects.all().distinct('category')
Eman
SELECT ••• FROM Hospital_patient WHERE Hospital_patient.id = 1 LIMIT 21 7 similar queries. Duplicated 7 times.
Patrick
if you have model with variable might have duplicate then... #collect duplicate first from django.db.models import Count duplicates = model.objects.values('some_variable').annotate(Count('id')).filter(id__count__gt=1) #then keep 1 and remove others by for duplicate in duplicates: queryset = model.objects.filter(some_variable=duplicate['some_variable']) queryset[1:].delete()
ManDo
Hello! How can I use annotate and subquery with 2 tables in 2 different databases?
Tamerlan
Hello everyone
Tamerlan
I never deployed project and I will have to do that in the future. I want deploy project to digitial ocean can you give me advise to start. what do i need to know for that or about how do it
Doragonsureiyā
I never deployed project and I will have to do that in the future. I want deploy project to digitial ocean can you give me advise to start. what do i need to know for that or about how do it
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
Charly
I want advise
My advise is: do some research there are many toturials out there, then if you have, come with specific questions
Tamerlan
Every tutorial use linux
Charly
Every tutorial use linux
yes, digital ocean is a mosntly linux vps provider
Tamerlan
But i use windows that is why I'm in trouble
Charly
But i use windows that is why I'm in trouble
Not a trouble, you justn need to learn some linux basics
Charly
No one will recommend to deploy on windows, ans it will be more expesinve
Tamerlan
Not a trouble, you justn need to learn some linux basics
Can i use linux in windows or i must change operating system?
Charly
Can i use linux in windows or i must change operating system?
you can use a VM or SWL, or ven try directly with the digital ocean droplet
Tamerlan
Okey thanks
Ernazarova
Doragonsureiyā
what is Linux, can you enlighten me
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
cj
I want advise
that's the best advice you can get
Tamerlan
don't use it, for real
Okey i go to change my operating system😂
cj
Every tutorial use linux
that's the proper O.S. you should use for servers
cj
Okey i go to change my operating system😂
that's what you really should do, for real, no jokes
Thomas
How to create a template for blog in Django ?
Charly
How to create a template for blog in Django ?
The same as other kind of template
Thomas
The same as other kind of template
Give me the details where to start
Doragonsureiyā
Give me the details where to start
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Ravi
How to use Token based google authentication system using as backed in django
Ravi
django-allauth
I need steps to integrate. Please guide me
مريم خالد
can someone tell me how can I convert the socket to endpoint so that can be consumed by the mobile app team
cj
can someone tell me how can I convert the socket to endpoint so that can be consumed by the mobile app team
a mobile app can connect to a socket, why the need to convert it to an endpoint? your mobile apps team should learn how to connect to a socket and interact with it
Alexey
مريم خالد
a mobile app can connect to a socket, why the need to convert it to an endpoint? your mobile apps team should learn how to connect to a socket and interact with it
Is it easy , we are trying to do project for a subject in college , since I do not have a lot of experience neither them I thought it maybe easier to convert it to endpoint but I am not sure
مريم خالد
Can djangochannelsrestframework do package do this ?
Alexey
Is it easy , we are trying to do project for a subject in college , since I do not have a lot of experience neither them I thought it maybe easier to convert it to endpoint but I am not sure
if u want make interactive u have to make sockets. if only refresh page - u may make DRF django-restframework for example. and make endpoints