How to Filter Children Model In Django RestFramework

2022-09-11 Thread Renfer Richards
https://stackoverflow.com/q/73677543/1985 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion

Re: How to Filter Children Model In Django RestFramework

2022-09-11 Thread Abhineet Baranwal
Just use that foreign key field name with double underscore filter field name. For example - you have a parent model ClassRoom having it's children model Student which is referred as student fk in ClassRoom. So if you want to filter student name from ClassRoom api then you can just write : filterse

Re: DJANGO ADMIN SPECIFICATION

2022-09-11 Thread chahat kaur
Yes On Sun, Sep 11, 2022, 00:48 Dushime Mudahera Richard wrote: > yeah All u said can be done in short """CRUD > > > *Best Regards * > *Dushime Mudahera Richard* > *Google Crowdsource Influencer* > *GDSC Lead 2021-2022 Bugema University* > *Visit :* https://www.facebook.com/BSA256 > *Visit

Does not displayed radio button in tutorial04

2022-09-11 Thread Mats
Hi, Member I am going through the tutorial at docs.djangoproject.com." I am implementing a form in "Writing your first Django app, part 4" but when I enter the code as per the tutorial, the radio buttons on the form do not appear. https://docs.djangoproject.com/en/4.1/intro/tutorial04/ I thin

Re: Why I love Django

2022-09-11 Thread Paul Onteri
Thanks! On Sunday, 11 September 2022 at 05:06:58 UTC+3 robbi...@gmail.com wrote: > Hello Paul > > On 10/9/2022 9:15 pm, Paul Onteri wrote: > > Choosing a web framework is hard. Especially now when there are a lot of > > frameworks on the market, each designed to address different project > > ne

Customise Django Models

2022-09-11 Thread Jishnu C K
Hi, Some blogs I have written, hope someone find it useful :) https://jishnuck.medium.com/customizing-django-models-to-facilitate-user-restricted-data-768fe8206f82 Jishnu C K jishnuc...@gm

DRF and React - request.user is "Anonymous user"

2022-09-11 Thread Jackson Patrick
I have used simple JWT for authentication and i have successfully logged in and am getting tokens also. But when i do a request.user in backend i get "Annonymous user". Tried passing Authorization header in axios post in FE REACT but it throws error. Am setting both refresh and access in a state va

Re: Filter by date range

2022-09-11 Thread tech george
Hello, I have tried debugging as below and it returned data; search_results = Prescription.objects.filter(date_prescribed__range=["2022-07-01",2022-07-30"]) Is there another way i can filter the dates? On Sun, Sep 11, 2022 at 9:47 AM Muhammad Juwaini Abdul Rahman < juwa...@gmail.com> wrote: >

Re: Filter by date range

2022-09-11 Thread tech george
I managed to solve the issue. I was using the wrong keyword to fetch the dates. Thanks for the support. On Mon, Sep 12, 2022 at 9:03 AM tech george wrote: > Hello, > > I have tried debugging as below and it returned data; > > search_results = > Prescription.objects.filter(date_prescribed__ran

Django DB connectivity to DB running in different server.

2022-09-11 Thread Prabakaran Balaji
*Hello Django Users,* Need some support on database connectivity in my django application. It's trying to connect with localhost even after specifying the IP address. Getting below error, could someone pls look into this? *Error - * Watching for file changes with StatReloader Performing system ch