Mirco
what do u expect ? you need to filter by grade so despite the count, you need to hit again the db
Mirco
Mirco
but if u need units and not a count of them, you can just use the len(...)
Shubham
Mirco
Mirco
when you are in the scenario where the app is slow due to those particular queries then you can apply some strategies and refactor
faran
How can i solve this problem about Serialization. Can anyone give me a hint?
https://stackoverflow.com/questions/64308926/display-serialized-objects-in-my-template-in-django
Mirco
faran
Anonymous
Mirco
Mirco
debug toolbar is part of the slowness
Anonymous
how much slow ?
Not much but it is good if I optimized I mean I am seeing opportunity for that like filtering with out db hit
Anonymous
Mirco
Mirco
Anonymous
Guys for each api there is a token or for the whole project a single token?
Anonymous
Anonymous
Anonymous
I want to change ID of button in template dynamic and get that id in Javascript by using getElementById() so how can I do that? Could someone plz help me?
Anonymous
Dynamically*
Bunty chhatri wala..
Anonymous
I took forloop and i want forloop.counter as my html id attribute and this also be change in JS
Anonymous
eg id="myId{{forloop.counter}}" and as per this it has to take document.getElementById("myId1").value (depends on counter)
Bunty chhatri wala..
Sarjat
Hey everyone i am making a social media application and Its actually like a video code along type of project can anyone explain me this paragraph that why did he use *args and kwargs and what is the use of super in this function actually the video uploader is trying to make a unique slug for all his users
Def save(self,*args,kwargs):
#code to make a unique slug
Super().save(*args,**kwargs)
Omair
Commodity
I am sending mails using SMTP library in python. Is there a way to check if the email was sent in turn checking that the email id exists?
Anonymous
Anyone connect flutter frontend with django backend??
Mirco
Anonymous
Sorry @Django_admin can I post a poll
Doragonsureiyā
Humberto
Hello group, I am trying to install pyreportjasper to process JasperReports templates (.jasper files) from django, but it fails trying to install the "jpy" dependency. Has anyone any experience on this? Is there another alternative to pyreportjasper for processing JasperReports templates?
M.T.saeedi
How can i write custom midlleware on o e route
And dont run for all of my rout
Anonymous
Anonymous
Hello
...
how to pass a model object from one view function to another view function?
Cesar
Hello, i have a problem. i have a project with 2 apps core (where i define models) and api where i have DRF files (serializers and views).the problem im facing is, when i try to deploy the project (or do a clean install, deleting the DB) it will throw an error at this line in api/serializers.py
class DummySerializer(serializers.Serializer):
dummy_id = serializers.ChoiceField(choices=[x.id for x in Dummy.objects.all()])
Saying django.db.utils.OperationalError: no such column: core_Dummy.field_id.
Why is it taking in consideration seralizer's code while doing migrations? obviously that field does not exists. i need that field to make migrations and creaate that field (?)
Anonymous
Anonymous
What's the error
Anonymous
Nothing
Anonymous
What is the value of abive statement being returned
Doragonsureiyā
Anonymous
Accounts.filter what's the value he's getting
Doragonsureiyā
Anonymous
If he's not getting anything he must be getting something buddy ... User.objects.get(username=username)
Anonymous
You can try this rahul
Doragonsureiyā
Anonymous
Have u worked on django or ever debugged it
Doragonsureiyā
Anonymous
So do u know how we check stuff when we r stuck or not
Doragonsureiyā
Anonymous
Seriously .. so this means when u r stuck with a particular value u Just don't check values in models or data in them
Doragonsureiyā
Anonymous
I got it... You haven't worked on live projects then... Carry on buddy...
Doragonsureiyā
R.U.S.H.A.B.H
How to store dictionary / list in django session... Till now it gives json serialisation error....please anyone has any tricks let me know
Saurabh
R.U.S.H.A.B.H
🤔🤔 in request.session[] ?
TM
I made a project in virtual environment in Python 3.9
But uninstalled it and installed
3.7 . So I am not able to get the setting . Can anyone help?
R.U.S.H.A.B.H
Shubham
Shubham
but
Shubham
but unable to login in admin,migrate is not working https://dpaste.org/DLdE
Shubham
https://dpaste.org/6HFt
Nirupam
Hello , two employees having same manager.. which relation will be there manytomany or foreignkey
Shubham
okay
Yuvraj