Tanner
Sea
How to make users to users chatting system to negotiate like OLX
Anyone please give any idea
Arslan
Hi guys, the question is how can I make a request to the model in Django ORM but remove one field from the response
Mirco
Arslan
how to implement it?
Alda
Mirco
Arslan
In general, I have such a problem, I need to receive object data in JSON format and I have an ImageField field that is not converted to JSON, so I want to remove it from the request and I think how to do it
Oleg
Guys, dont you know how to handle this case? I have passed token to "sec-websocket-protocol" headers parameter in django channels and everything works great in mozilla firefox, but in chrome and in some other browsers right after connection has established it immediately disconnects with error code 1006.
And if Im passing token in queryparams or inside cookie - at these cases everything is fine in all browsers. Could you please point out whats wrong with "sec-websocket-protocol"?
Solved this issue.
If you pass something in headers parameter Sec-WebSocket-Protocol, then you need to additionally specify it in "accept method" as an additional argument with the name of protocol you used. Because Its not enough to have it in scope and you also need to extract these protocols from scope and place it in accept method.
Amir
hi
can anyone help me write below code in a template in jinja?
for index, value in enumerate(some_queryset):
Charly
Charly
Amir
lucky
Am new to django
After adding dispatch to redirect user
That are not allow to access some pages
My stop rendering in the template only submit buttom appear
lucky
I mean my form
Nav
What can I do
When my inputs are not shown in the admin panel
Nav
Am able to give inputs and able to open admin panel
But there are no values
Avii
Mahmood
Hi
i want to rename a field in unique_together fields for an model
And it's give error in the makemigrations
I have already database and don't want to drop it
I already did some search and found that there is alot of conversation about this
But didn't find any solution
Azizbek Xushnazarov
Ritesh
I have facing an issue can anyone suggest any solution of this issue:-
While generating JWt tokens we have to authenticate request in postman bearer token
Ritesh
With no auth I have also fetch data
Can anyone suggest me how I overcome this situation
Mahmood
What error are you facing
ages/django/db/migrations/autodetector.py", line 1457, in _get_altered_foo_together_operations
field = new_model_state.get_field(field_name)
File ".../lib/python3.10/site-packages/django/db/migrations/state.py", line 762, in get_field
return self.fields[field_name]
Jay
I want to sort my objects by price
Jay
But price field belongs to one-to-one related modal
Jay
Can anyone help me in making a query for sorting objects price wise
Mirco
share models in pastebin.org and we'll help u quickly
Mahmood
What error are you facing
I tried to remove the unique_together then migrate , then i rename the field
Now i want to readd the unique_together again with the renamed field
But it doesn't work
Mahmood
It gives the same error
Jafar
Can i write a json object in json_script templates tag
karakurt
Azizbek Xushnazarov
Azizbek Xushnazarov
karakurt
karakurt
Jay
I have programed for search with pagination and sorting
Jay
When I change page my sort query gets reset
Jay
Can anyone help me
Azizbek Xushnazarov
What is context? This code works (I took it from my project)
If you use generic views they send request and view through the context attribute of the serializer. But In your case PositionSerializer cannot access the request and view.
So it's always a good habit to pass parent serializer's context to child serializers.
Ôscar
Guys my media file doesn't load when debug = False
Ôscar
How to solve this problem
karakurt
Jay
Alberto
Hi, I need to update the user session from outside views (in a Celery task). Currently I'm passing the user session id to the task, and then initializing a Sesion object and updating the required value. The problem is that I cannot access this value then from request.session. I can't find any relevant information about this, any suggestions on how to solve this?
Saqib
Hello everyone i am stuck in django payment .
My question is how user can send money to another user on his bank account like amazon customer send money to Amazon seller bank accounts
unknown
jaxx
class UsersCount(APIView):
def get(self, request):
users = Account.objects.count()
serializer = AccountSerializer(users, many=True)
return Response(serializer.data)
This one shows "int object is not iterable".
Anyone please explain
Shahrukh
Can anyone please me in creating api
Maksim
Hi, guys! How to add search system in header right from buttons(setting, create an article, everything articles)
Maksim
I to add this search system in header she is down but not to left. Help me, please
Maksim
For example, if search system right from button he's under button elif left right button he's on one line
Avii
jaxx
Ôscar
Raadin
Ôscar
In short, you must host that media file
Ôscar
I used claudinary
Ôscar
So easy and effective
Ôscar
But now I have another problem
Raadin
Ôscar
My textfield
Ôscar
When I inject it in html template
Ôscar
All text appears in one p tag so
I used linebreaks filter to make it appears in multiple p tags
Ôscar
The whole idea is that I have mixed text between Arabic and English p tags, and when I make direction : "rtl"
It does not target p tags of Arabic only
But the whole p tags in my div
Ôscar
I don't know how to solve this problem
Ôscar
I think no one understands my problem 😂😂😂😂😂😂
Gnomic
I have create the template but it still show me this error
Ôscar
I solved it
Ôscar
I added some regex logic in my templates
Fife
Does anyone have a sample code for callback function/closure