Charly
Does anyone have a sample code for callback function/closure
Like in a common context python python nor django have callbacks, especifically what are you doing?
Jay
Hello can anyone help me for sort by price using ajax
Jay
I have written some code but query is not running
Charly
I have written some code but query is not running
Then share your code and tell us exactly how is not running
Jay
https://dpaste.org/rhscs
Jay
https://dpaste.org/8jp78
Jay
https://dpaste.org/0zrff
Charly
https://dpaste.org/rhscs
You are not returning anything
Jay
That code is only for sort
Jay
Below there I am returning html page
Charly
That code is only for sort
In the view your get method is not returning anything
Jay
https://dpaste.org/n2k9V
Jay
Now see
Jay
I want to sort my list price wise
Charly
I want to sort my list price wise
yes you are expenting in the javascript a jsoon but your view is returning HTML
Jay
I don't want Jason can I remove it?
Jay
I don't know much about json
Charly
I don't want Jason can I remove it?
you can do whatever you want, just make sure all parts are intented to work together
Charly
if you don't want json then don try it to do it with ajax
Jay
Okay
Jay
Can you give me some references?
Jay
For ajax
Jay
I am totally new for ajax
Charly
I am totally new for ajax
you don't want json why do you want ajax?
Vishal
Hi team, Can anyone guide me how to create a django customization template. And can i create a form page in details view template ?
Ugochukwu
Hi team, Can anyone guide me how to create a django customization template. And can i create a form page in details view template ?
Let your get method call the detailed view with the form elements inside, and your post method post the data.
Vishal
Sir i will explain
Vishal
I have 2 database table like a & b
Vishal
We create a details view of a table and now we required form page of a B table in a same template
Vishal
Foreignkey is used in b table of a
Vishal
Understood or not ?
Farzin
Hi, When I do this operation for comparing time delta in django shell the result is False, as I expected but doing the same operation after retrieving datetime field in views give me the True as an output. Also in production it works well. Note: Timezone is set on UTC by default This the code: https://hastebin.com/ahukiyemer.properties
Evgenii
Hi! I have a model like this: MyModel: dt = int (timestamp) duration = int (minutes) How can I find object by some value that is: 1) greater or equal to dt 2) less or equal to dt + duration Solution: Q(dt__lte = val, dt__gt = val - F('duration') * 60),
Ali
can i rename my django app's name without errors?
Ali
Yes
how?
Rojitech
Do you use vscode
Rojitech
Just search for the name of your project in the search bar at the side panel
Rojitech
Then replace the name
Hamza
Hello I have a question Can I store files in different folder which images stored into
Hamza
Like (Files with vcf extension)
Tура
{{ str(user_profile.user).lower() }} I am getting error for this how can Iwrite it like that
Tура
I need to get by lowercase of the username
Anton
Hello! May you help me with 1 question about DRF. Look i developing 1 app and it required sending API verison in header (AcceptHeaderVersioning). Is here any solution (like wrapper on path function or etc) to separate views for each version (like it works with URLPathVersioning)
Tура
{{ user_profile.user | lower }}
thank you very much!, you saved my time!
Shams
thank you very much!, you saved my time!
Welcome. Check this form u can find more cool features https://django.fun/docs/django/ru/4.0/ref/templates/builtins/?ysclid=l7ka8rq48q107874709
Mohammed
Hello friends i would like submit an html form with a foreign. When i submit the form it returns an error saying Cannot assign "'1'": "Building.building_type" must be a "BuildingType" instance.
Ritesh
How I integrate 3rd party api in django api
Forrest
good morning How can I make it so that when I get an attribute on the form, the other model attributes automatically appear?
Charly
I'm supposed to work with an sms api
Still not enough details to help you
Fife
Still not enough details to help you
Okay, there's a short code, say 9999, when a client sends a message to that short code, data is meant to be sent to the callback url
Charly
Okay, there's a short code, say 9999, when a client sends a message to that short code, data is meant to be sent to the callback url
So its just a normal URL but is going to be called by the service and not by the user directly
Nasir Ahmad
How can we have multiple files with one field in models
Charly
Nasir Ahmad
What do you mean by multiple files?
The file format is not important, I just want to get several files in one field
Nasir Ahmad
Yes
Charly
Yes
Not possible a field can only hold a single data value, but you can create an additional model that have a Fk to your main model and a file field, so you'll have a OneToMany relationship
Ali
guys i have this serializer https://dpaste.org/xAAdr when i try to authenticate by a user that i create by a register view it comes none ... but when i authenticate by the super user it works well
Ali
so where is the error may be?
yusof
hey guys can anyone know a good monitor tool for django website and database? im having new changes in my database for performance and i want to know it has any affect or not ? thanks
Kene
What error message do you get when you try authenticating?
Ali
What error message do you get when you try authenticating?
Invalid credentials and when i print user ... it prints None
Kene
I don't see what the issue might be.
Kene
Except it's something with your registration serializer
τηεງυς
Hi , I would like to create an multiplayer game but have no idea for live sharing data,do i use frameworks like socket.io or is there a better way in django or python Is it the same way i create chat app??
Kene
Nothing looks wrong, at least to me. So, 1) is AUTH_USER_MODEL set? 2) is authentication_backend is also set as well?
Nasir Ahmad
Hello How to make a model in Django to get a folder from the user?
Vladislove
Guys how in field do limit? I need always 6 symbols
Vladislove
😞