Anonymous
it always eats my head
Anonymous
should i concern too much about security?
Sadra
It's a bit out there. Something separated from the Authentication process. It's kinda session management.
Sadra
should i concern too much about security?
Security is important. Django does a lot of things. In spite Django does some configurations, you have a lot of additional options that you might need to use in your production. Currently on Django3.1, some other options has been added. Suggest: https://docs.djangoproject.com/en/3.1/releases/3.1/#security
Sadra
tysm :)
❤️ :)
Sander
How can I do a cumulative sum of a value in my model grouped by date?
Pikachu
How to do multiple create at a same request and if any data is duplicate than the return the duplicate data
Sander
Study annotate and aggregate on Django docs
I have the following query rn: pl_cum = Tip.objects.values("prediction__fixture__date__date").annotate(total_pl=Sum("pl")).filter(channel__name__contains="Premium").order_by('prediction__fixture__date')
Marcos
sorry its true
Sander
Did u check https://stackoverflow.com/questions/43517901/cumulative-running-sum-with-django-orm-and-postgresql ? Especially the Window functions
Yes and I changed my query to pl_accum = Tip.objects.values("prediction__fixture__date__date").annotate(cum_pl=Window(Sum('pl'), order_by=F('prediction__fixture__date').asc())).filter(channel__name__contains="Premium").order_by('prediction__fixture__date') This is now returning me the cumulative per Tip instead of per date
Mirco
Never done something like this yet, I cannot help u so much 😯
Bogdan
hi guys. Who could help me with project?)
Bogdan
I have some troubles with urls on my production
Bogdan
I need to show my html on https://1/2/3(example), but idk how i could realize it o django
Bogdan
it looks like easy task, but i can't finish it
Mike
Hello everyone, I have problem with login what not working. here is a code of views link of code: https://repl.it/@mikemikel/ElderlyBruisedHertz#model.py when I click submit in login.html its give its error "ValueError at /login/ The view stamit.views.login didn't return an HttpResponse object. It returned None instead.". who can helping please?
Mike
Return a httpresponse object..
how? form.is_valid for this?
Hamirul
hello gais . one question here
Hamirul
does anyone know what is the main issue here ? django admin dint show the admin site eventho i declare at the url src ?
Hamirul
from django.contrib import admin urlpatterns = [ url('', views.todo, name='todo'), path('admin/', admin.site.urls), path('api/', include(router.urls)) # add this ]
Ivan
Hi everyone, can anybody help me on django_restframework
Ivan
?
Ivan
With some guides and tutorials links apart of the oficial bibliografy?
Shiva
Hi everyone, can anybody help me on django_restframework
Follow this easy tutorial https://youtu.be/B38aDwUpcFc
Anonymous
from django.contrib import admin urlpatterns = [ path('admin/', admin.site.urls), path('api/', include(router.urls)), url('', views.todo, name='todo'), ]
Hamirul
ok done . tqsm from malaysia 🇲🇾
Shubham
is there any way to to make API live so that the frontend guy can better consume it?
Shubham
I have a requirement to implement user groups of Admin(CAN ADD ANY USER), Teacher (Can add any student), student(can only view his profile) in DJANGO FRAMEWORK. how to implement this using django groups?
Commodity
Should I use a database for handling messages or message queues?
Commodity
Should I use a database for handling messages or message queues?
Like if we have to handle a million messages?
cj
Should I use a database for handling messages or message queues?
you should use a queue manager to handle queues 🤷🏻‍♂️
Sai
Hi friends while I am rendering the data in the form then I am getting the error as " No reverse match" " App_name with arguments () not found. Pattern tried[]" But i have given the urls perfectly but i am not getting why I am getting that error. Can u guys please help me with this
Anonymous
Can you share your urls.py and snap of error
Commodity
Like if we have to handle a million messages?
But isn't handling a message queue for each user expensive?
M
Is there any way to calculate reaction time of users in milliseconds? (The time it takes from opening a page to clicking on a key)
Sadra
Is there any way to calculate reaction time of users in milliseconds? (The time it takes from opening a page to clicking on a key)
Use extentions like Hotjar. Otherwise, you can use js packages to calculate those parameters. ❤️
Doragonsureiyā
Read the rules before any activity: @PythonRules
Sh
Assalamu alaikum. is it possible to use prefetch_related operation inside select_related? class Student() university = ForeignKey(University) class University() .... class UniversityName() university = ForeingKey(University,related_name="name") I want to get UniversityName from Student object. I did: student = Student.objects.select_related("university__name").get(pk=1) this gives me error how to make such query properly?
Mirco
What d'ya wanna know ?
Mirco
No
R.U.S.H.A.B.H
Does anyone has implemented the custom user model ... I want the explanation of abstract class with logic if anyone can explain it with an example 🤔
Mirco
Does anyone has implemented the custom user model ... I want the explanation of abstract class with logic if anyone can explain it with an example 🤔
Official docs is enough clear about it and maybe you need to study better what am abstract class is in Python
Mirco
Can anyone please guide me on this
Cj has already answered u
Commodity
Cj has already answered u
Then I asked another question on that
Mirco
Then I asked another question on that
Yes but you have gone deeper on what cj suggested u ?
Commodity
Yes but you have gone deeper on what cj suggested u ?
I am sorry I'll do a proper research and get back to it
Ghorz
Although I entirely swapped out username from the Model.
Ghorz
Only email and password
Ghorz
I also fused it with Django allauth
Ghorz
So you can do all authentication
M
https://pypi.org/project/Django-CustomUser-Model/
What is bootstrap application in setting ? Till now I only know to use bootstrap in html template
Ghorz
pip install django-bootstrap4