Re: Changing my github django simple ecommerce to use drf and and react native frotend

2024-05-20 Thread Natraj Kavander
Thank you On Mon, May 20, 2024, 7:31 AM De Ras wrote: > Hey would am changing my django ecomerce site in github from traditional > views and fprms to use django rest framework and react native as its backed > greater support appreciated for any support. There is the link to my repo > https://git

Changing my github django simple ecommerce to use drf and and react native frotend

2024-05-19 Thread De Ras
Hey would am changing my django ecomerce site in github from traditional views and fprms to use django rest framework and react native as its backed greater support appreciated for any support. There is the link to my repo https://github.com/D3ras/eccommerce-django -- You received this message be

Re: DRF Trailing Slah

2024-04-12 Thread Luis Zárate
Check your URL.py and append the slash, also take a look of https://docs.djangoproject.com/en/5.0/ref/settings/#append-slash El vie, 12 abr 2024 a las 15:40, MISHEL HANNA () escribió: > Hello > i have endpoint when add / to the end of it i can not send request it > return this > Not Found: /api/

DRF Trailing Slah

2024-04-12 Thread MISHEL HANNA
Hello i have endpoint when add / to the end of it i can not send request it return this Not Found: /api/v1/properties/user/ [12/Apr/2024 20:19:03] "GET /api/v1/properties/user/ HTTP/1.1" 404 23 but when remove / from the end of it return success [12/Apr/2024 20:19:09] "GET /api/v1/properties/use

Re: Help with DRF error

2023-12-16 Thread Larry Martell
16, 2023 at 10:00 AM Larry Martell > wrote: > >> I have a DRF API. It is throwing an error that I have not been able to >> fix. >> >> Here is my view and serializer: >> >> class CreateNotations(CreateAPIView): >> permission_classes = [IsAuthenticated

Re: Help with DRF error

2023-12-16 Thread Reddy Tintaya
Can't you just use workitem = serializers.PrimaryKeyRelatedField( queryset=WorkItem.objects.all()) instead of workitem_id? On Sat, Dec 16, 2023 at 10:00 AM Larry Martell wrote: > I have a DRF API. It is throwing an error that I have not been able to fix. > > Here is my view

Help with DRF error

2023-12-16 Thread Larry Martell
I have a DRF API. It is throwing an error that I have not been able to fix. Here is my view and serializer: class CreateNotations(CreateAPIView): permission_classes = [IsAuthenticated] serializer_class = NotationListSerializer def post(self, request, *args, **kwargs): return

Saving data from a post request using nested DRF serializers

2023-04-26 Thread Kimanxo
Here is my problem im gelreat details : https://stackoverflow.com/questions/76112118/django-rest-frameworks-nested-serializers-post-request-foreignkey-error -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

drf serializers

2023-02-24 Thread Chelsea Fan
how to count manytomany field items in serializers.py? -- 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 di

Django REST Framework (DRF) Cheat Sheet

2023-01-09 Thread Manuel
Hello, I created the Django REST Framework (DRF) Cheat Sheet <https://cheatsheetseries.owasp.org/cheatsheets/Django_REST_Framework_Cheat_Sheet.html> and the community feedback will be greatly appreciated. Please feel free to read them and let me know if you have any feedback :) R

how to serialize default user model in drf serializer

2022-12-08 Thread Agnese Camellini
Good morning, i am doing a simple interface which has a foreign to the default user model: I find some difficulties in writing the serializer as there's not serializer for the User default model. Any idea of how can i solve this? Below is my model code. Regards. AGnese Camellini from django.conf

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

2022-09-20 Thread Deep Chirag
yes On Tue, Sep 20, 2022 at 9:49 AM Jackson Patrick wrote: > Do i need to pass token in headers? > > On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, > wrote: > >> make sure you have listed auth as jwt and added permission class for >> authentication >> >> On Monday, 12 September 2022 at 09

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

2022-09-19 Thread Mohammad Ehsan Ansari
yes you need On Tue, 20 Sept 2022 at 09:49, Jackson Patrick wrote: > Do i need to pass token in headers? > > On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, > wrote: > >> make sure you have listed auth as jwt and added permission class for >> authentication >> >> On Monday, 12 September 20

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

2022-09-19 Thread Jackson Patrick
Do i need to pass token in headers? On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, wrote: > make sure you have listed auth as jwt and added permission class for > authentication > > On Monday, 12 September 2022 at 09:52:22 UTC+5:30 jacks...@gmail.com > wrote: > >> I have used simple JWT fo

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

2022-09-19 Thread Mohammad Ehsan Ansari
make sure you have listed auth as jwt and added permission class for authentication On Monday, 12 September 2022 at 09:52:22 UTC+5:30 jacks...@gmail.com wrote: > I have used simple JWT for authentication and i have successfully logged > in and am getting tokens also. But when i do a request.us

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: User authentication with simple-jwt drf

2022-08-31 Thread Mobina J
hii import pandas as pd from django.contrib import messages from django.core.mail import EmailMessage from django.shortcuts import render from django.template.loader import render_to_string from app_1.form import NotificationForm def email_generic_template(request): form = NotificationForm(requ

Re: DRF - request.user returns None

2022-08-26 Thread Lipede Tope
Check if the user is authenticated Eg if user.is_authentucated On Fri, Aug 26, 2022, 3:11 PM Lipede Tope wrote: > > > On Fri, Aug 26, 2022, 2:40 PM Jackson Patrick > wrote: > >> I am trying to get user using request.user and when printing gets None >> and in console it shows >> "Annoymous user"

DRF - request.user returns None

2022-08-26 Thread Jackson Patrick
I am trying to get user using request.user and when printing gets None and in console it shows "Annoymous user". and am using simple jwt -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

User authentication with simple-jwt drf

2022-08-24 Thread Lakshyaraj Dash
Hello everyone, I want to create a user authentication app using ReactJS and django. But facing problems in authenticating with the jsonwebtokens in ReactJS. Can anybody provide correct guide of implementing DjangoRestFramework simple-jwt and ReactJS jet ? -- You received this message because you

Re: DRF question

2022-07-24 Thread Ram
Hi Jason, Thank you for your email. 1. I'm not sure what you are referring to 'template-based' responses with RESTFUL? 2. Also we are not looking for extensibility to be smooth. My concern is why we need to change the existing implementation in user registration when DRF is a s

Re: DRF question

2022-07-24 Thread Ram
Hi Jason,is separ Thank you for your email. 1. I'm not sure what you are referring to 'template-based' responses with RESTFUL? 2. Also we are not looking for extensibility to be smooth. My concern is why we need to change the existing implementation in user registration when DR

Re: DRF question

2022-07-23 Thread Jason
sure, it can be used to extend, but you're also equating template-based responses with restful. those are pretty differnet paradigims, so you do need to account for the different use cases. there's a reason why DRF is a separate package built on top of django, and not in core. bec

Re: DRF question

2022-07-23 Thread Ram
Hi Jason, Thank you for your email. I expected DRF could be an extensible feature rather than forcing to change existing implementation. Extensibility practice happens in many open source and enterprise projects. That is why I'm shocked to learn this. Best regards, ~Ram On Sat, Jul 23,

Re: DRF question

2022-07-23 Thread Jason
Jul 20, 2022 at 10:44 PM Julio Cojom wrote: > >> Hi Ram, >> >> Aditional to all the suggestions, please keep in mind django-filters as >> they are important to filter data in your api requests >> >> Regards, >> >> Julio Cojom >> >> El mié, 20

Re: DRF question

2022-07-22 Thread Ram
ll the suggestions, please keep in mind django-filters as > they are important to filter data in your api requests > > Regards, > > Julio Cojom > > El mié, 20 jul 2022 a las 20:37, Michael Thomas (< > michael.thomas.s...@gmail.com>) escribió: > >> There's

Re: How to use Authentication in DRF

2022-07-21 Thread Ammar Mohammed
How is your login view working ? Or this is your login view ? Please share the whole app views and urls. (I suggest using DRF class based views as it's alot useful and helpful when it comes to authentication and permissions) Regards, -- Ammar Mohammed On 21 Jul 2022 08:24, "Sa

Re: How to use Authentication in DRF

2022-07-20 Thread Salima Begum
want is JSON Response. Why it's not reading credentials I mentioned there? Thanks ~Salima On Thu, Jul 21, 2022 at 10:58 AM Ammar Mohammed wrote: > Hey Salima > I guess you can use access token authentication in DRF. > But Do you recive the response without logging in? > Plea

Re: How to use Authentication in DRF

2022-07-20 Thread Ammar Mohammed
Hey Salima I guess you can use access token authentication in DRF. But Do you recive the response without logging in? Please explain more please -- Ammar Mohammed +249 113075979 On 21 Jul 2022 07:08, "Salima Begum" wrote: > Hi all, > > I am trying to convert my current proj

Re: DRF question

2022-07-20 Thread Julio Cojom
Hi Ram, Aditional to all the suggestions, please keep in mind django-filters as they are important to filter data in your api requests Regards, Julio Cojom El mié, 20 jul 2022 a las 20:37, Michael Thomas (< michael.thomas.s...@gmail.com>) escribió: > There's no reason at all tha

Re: DRF question

2022-07-20 Thread Michael Thomas
There's no reason at all that DRF can't be used to do this. Just don't use a viewset, as it's not the right fit for this type of thing. Read through the code for how your current system works, then re-implement the relevant parts as DRF ApiView's. On Thu, Jul 21, 2

Re: DRF question

2022-07-20 Thread Ram
Thank you all for quick suggestions. We are stuck with implementing the first API, which is login endpoint. That means since we already developed user registration functionality before without DRF, there seems no way to create a login endpoint so that an existing registered user can login using

Re: DRF question

2022-07-19 Thread Hella thor
Hi Ram 您可以在原来项目的基础上创建新的APP来单独给移动应用程序来使用,并在整体项目完成以后研究是不是需要DRF来兼容。 Lalit Suthar 于2022年7月19日周二 19:04写道: > I would also suggest keeping Django views as it is and writing new views > for your APIs > maybe you can create another file named apiviews.py and then write new > APIs with

Re: DRF question

2022-07-19 Thread Lalit Suthar
Chawla wrote: > Don't clutter the django views with DRF requests. Keep them separate, > available at, say `api` endpoints. > > On Tue, 19 Jul 2022, 06:17 Michael Thomas, > wrote: > >> Hey Ram, >> >> I'm afraid no one can answer your questions without k

Re: DRF question

2022-07-18 Thread Nikhil Chawla
1. Serializers.py for each model. 2. Maybe create separate DRF views that parse and render JSON, and avoid cluttering pure Django views. 3. Keep the website UI as is. On Tuesday, July 19, 2022 at 5:52:19 AM UTC+5:30 ram.mu...@gmail.com wrote: > Hi, > > We completed coding all the

Re: DRF question

2022-07-18 Thread Nikhil Chawla
Don't clutter the django views with DRF requests. Keep them separate, available at, say `api` endpoints. On Tue, 19 Jul 2022, 06:17 Michael Thomas, wrote: > Hey Ram, > > I'm afraid no one can answer your questions without knowing your code, how > it works, or anythi

Re: DRF question

2022-07-18 Thread Ram
Hi Thomas, Thank you very much for your quick response. I think you understand my requirements. I'm basically trying to know what needs to be done in DRF implementation for developing a mobile app using Flutter when my website is still using existing UI and also without changing any function

Re: DRF question

2022-07-18 Thread Michael Thomas
On Tue, Jul 19, 2022 at 7:21 AM Ram wrote: > Hi, > > We completed coding all the features without DRF for our web site and now > we are planning to develop a mobile app for the same website by keeping the > web site as it is and develop a mobile app using Flutter. > > Based

DRF question

2022-07-18 Thread Ram
Hi, We completed coding all the features without DRF for our web site and now we are planning to develop a mobile app for the same website by keeping the web site as it is and develop a mobile app using Flutter. Based on our understanding, we have do the following in the current code for adding

Interested to Work with Python,Django,DRF

2022-07-13 Thread Suresh_Chilukuri
Hi All, I am suresh, I want to work with python,django,DRF technologies and I worked on different examples while learning them . I am have 11 months of experience in Software Engineer Role ,Currently I am working as Development Report for banking using Active Reports Tool. I have Knowledge in

Generalize search criterion django and drf

2022-04-04 Thread Trippy Samurai
I have ListView where i display some results on my website and i have search parameter which gives the result based on title and number here i should ignore the exact spelling and show the results for both i.e search criterion to be able to ignore "." "et al." and similar terms so that when sea

help creating a nested serializer using drf

2022-02-02 Thread ola neat
good day guys, i'm working on a project and i'm creating mulitiple model linked using foriegnKey field but i'm getting a relatedManager object has no attribute id err below is the link to my question on slack, hope anyone can help out https://stackoverflow.com/questions/70928548/how-to-fix-attribut

Sending unsafe requests from web extension to DRF - cannot send Referer

2021-09-30 Thread Brad Solomon
We have a web extension using Chrome Manifest V3 , which talks with a backend web service written with Django (3.2) / Django Rest Framework, and served with Gunicorn/Nginx. After turning on HTTPS, we are no longer to successfully make uns

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
Date: 26/6/21 04:38 (GMT+10:00) > To: Django users > Subject: Re: DRF | Django | Up votes | Down Votes > > Ryan Thank you so much. I will give it try. and let you know about the > results > > On Fri, Jun 25, 2021 at 8:59 PM Ryan Nowakowski > wrote: > >> On Thu, Jun

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread Mike Dewhirst
HE lmbo pop l9m6oo9k--(Unsigned mail from my phone) Original message From: DJANGO DEVELOPER Date: 26/6/21 04:38 (GMT+10:00) To: Django users Subject: Re: DRF | Django | Up votes | Down Votes Ryan Thank you so much. I will give it try. and let you know about the resultsOn

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
Ryan Thank you so much. I will give it try. and let you know about the results On Fri, Jun 25, 2021 at 8:59 PM Ryan Nowakowski wrote: > On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote: > > Hi Django experts. > > I am building a Django, DRF based mobile app and

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread Ryan Nowakowski
On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote: > Hi Django experts. > I am building a Django, DRF based mobile app and I want to have > functionality of up votes and down votes for posts that user will post. > So what I want to say here that, if an user upvotes a

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
;diff': 'upvote - downvote'}).order_by('diff') >>> >>> >>> Best regards >>> >>> Stephen Oba >>> >>> On Fri, Jun 25, 2021, 6:03 AM DJANGO DEVELOPER >>> wrote: >>> >>>> Is there anyone w

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread Chetan Ganji
x27;) >> >> >> Best regards >> >> Stephen Oba >> >> On Fri, Jun 25, 2021, 6:03 AM DJANGO DEVELOPER >> wrote: >> >>> Is there anyone who can help me here? >>> >>> On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER < >&g

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
'upvote - downvote'}).order_by('diff') > > > Best regards > > Stephen Oba > > On Fri, Jun 25, 2021, 6:03 AM DJANGO DEVELOPER > wrote: > >> Is there anyone who can help me here? >> >> On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER &

Re: DRF | Django | Up votes | Down Votes

2021-06-24 Thread oba stephen
ote'}).order_by('diff') Best regards Stephen Oba On Fri, Jun 25, 2021, 6:03 AM DJANGO DEVELOPER wrote: > Is there anyone who can help me here? > > On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER > wrote: > >> Hi Django experts. >> I am b

Re: DRF | Django | Up votes | Down Votes

2021-06-24 Thread DJANGO DEVELOPER
Is there anyone who can help me here? On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER wrote: > Hi Django experts. > I am building a Django, DRF based mobile app and I want to have > functionality of up votes and down votes for posts that user will post. > So what I want to say here

I am using django with DRF and dj_rest_auth

2021-06-12 Thread Manas Paul
I have made my custom user model. The dj_rest_auth returning the response after successfull login { "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjIzdXJfaWQiOjZ9.4yjIBxXhe5grxCe18huamgj1qP44A-zOkUHxZ61wXao" , "refresh_token": "eyJ0eXAiOiJKV1QiLC

Re: [DRF] Serializing a field of type choice

2021-06-10 Thread ezequia...@gmail.com
l.com >> wrote: >> >>> Hey guys >>> >>> Could you help me with a Django Rest Framework question? >>> >>> I have a field in my model that has possible input values, so I'm using >>> the *choices=* attribute in my model. >>

Re: [DRF] Serializing a field of type choice

2021-06-10 Thread Nikeet NA
hat has possible input values, so I'm using >> the *choices=* attribute in my model. >> >> I'm having difficulty serializing the return of this data in drf. >> >> Could someone give me a hint on how best to implement this, please? >> >> Sincerely >>

Re: [DRF] Serializing a field of type choice

2021-06-10 Thread ezequia...@gmail.com
t think any extra configuration is > required for it > > On Thu, 10 Jun 2021 at 04:44, ezequia...@gmail.com > wrote: > >> Hey guys >> >> Could you help me with a Django Rest Framework question? >> >> I have a field in my model that has possible input values

Re: [DRF] Serializing a field of type choice

2021-06-09 Thread Lalit Suthar
values, so I'm using > the *choices=* attribute in my model. > > I'm having difficulty serializing the return of this data in drf. > > Could someone give me a hint on how best to implement this, please? > > Sincerely > Hezekiah Rock > > -- > You received this me

[DRF] Serializing a field of type choice

2021-06-09 Thread ezequia...@gmail.com
Hey guys Could you help me with a Django Rest Framework question? I have a field in my model that has possible input values, so I'm using the *choices=* attribute in my model. I'm having difficulty serializing the return of this data in drf. Could someone give me a hint on h

Re: DRF simplejwt refresh access_token stored in httponlycookies

2021-05-08 Thread 'OCHIENG LEON' via Django users
Are you using Redux for State management? You could pass in the UserInfo which will include the refresh and access token to the states. On Sat, 8 May 2021, 5:49 am narendra...@gmail.com, < narendrathapa...@gmail.com> wrote: > i'm using django as my backend and react as frontend. i'm using simplej

Re: DRF simplejwt refresh access_token stored in httponlycookies

2021-05-08 Thread Michael Thomas
That depends a bit on the scope of your App and what you need to protect against. In a recent project of mine, for example, all authentication related code (including JWT retrieval/refresh) is within an iframe on a different origin. The client application requests an access token from the "auth" i

Re: DRF simplejwt refresh access_token stored in httponlycookies

2021-05-08 Thread narendra thapa
Thank You @Michal Thomas, i was able to refresh a token now, But i got another confusion from your answer :D. Which is the best place to store a refresh token to make it secure? On Sat, May 8, 2021 at 12:20 PM Michael Thomas < michael.thomas.s...@gmail.com> wrote: > Generally speaking, storing a

Re: DRF simplejwt refresh access_token stored in httponlycookies

2021-05-07 Thread Michael Thomas
Generally speaking, storing a JWT token (especially a refresh token) as a cookie isn't the best thing to do, as it means you're potentially "leaking" the token in every request where that cookie is valid, rather than intentionally sending it as a header only when you intend to (among other issues).

DRF simplejwt refresh access_token stored in httponlycookies

2021-05-07 Thread narendra...@gmail.com
i'm using django as my backend and react as frontend. i'm using simplejwt for authentication. i can get access and refresh token and has stored in httponly cookies. now i'm not able to refresh a token. can somebody help me out? -- You received this message because you are subscribed to the Goo

Re: reg: DRF login API

2021-04-08 Thread 'Amitesh Sahay' via Django users
;token": "db058f23ecc70f4fa3de4ac69a04dc48bb7579a63aea1ad3d038ce59b1511890" I tried both, password and token to authenticate, but I am getting the same error. In the cmd prompt where the dev server is running, I am seeing below message ====[08/Ap

Re: reg: DRF login API

2021-04-08 Thread RANGA BHARATH JINKA
..@test.com", > "first_name": "est", > "last_name": "Sah", > "employee_code": "6124368", > "contact": "7500078619", > "dob": null > }

Re: reg: DRF login API

2021-04-08 Thread 'Amitesh Sahay' via Django users
==[08/Apr/2021 15:26:33] "POST /apii/login/ HTTP/1.1" 403 27Forbidden: /apii/login/In the postman raw body, I am inserting below json data {    "email": "test.t...@test.com",    "password": "db058f23ecc70f4fa3de4ac69a04dc48bb75

Re: reg: DRF login API

2021-04-08 Thread RANGA BHARATH JINKA
uot;, >> "last_name": "Sah", >> "employee_code": "6124368", >> "contact": "7500078619", >> "dob": null >> }, >> "token": >> "db058f23ecc

Re: reg: DRF login API

2021-04-08 Thread RANGA BHARATH JINKA
quot; > > *I tried both, password and token to authenticate, but I am getting the same > error. In the cmd prompt where the dev server is running, I am seeing below > message* > > > [08/Apr/2021 15:26:33] "POST /apii/login/ HTTP/1.1" 403 27 > Forbidden: /apii/login/ > &g

reg: DRF login API

2021-04-08 Thread 'Amitesh Sahay' via Django users
where the dev server is running, I am seeing below message [08/Apr/2021 15:26:33] "POST /apii/login/ HTTP/1.1" 403 27Forbidden: /apii/login/====In the postman raw body, I am inserting below json data {    "email": "test.t...

Re: reg: Django vs DRF

2021-03-27 Thread Kelvin Sajere
Firstly, DRF is just like any other app you would create in your project when you use it. It's not a full-blown framework. With that said, DRF uses the same authentication system, I only use token authentication when I am working on a project the frontend is decoupled from the backend. If n

Re: reg: Django vs DRF

2021-03-27 Thread Ryan Nowakowski
A bit of googling led me to this: https://pypi.org/project/drf-registration/ I haven't personally used it but it looks like it might fit the bill. On March 26, 2021 2:51:54 AM CDT, 'Amitesh Sahay' via Django users wrote: >I have a basic question.From all the tutorials and do

reg: Django vs DRF

2021-03-26 Thread 'Amitesh Sahay' via Django users
I have a basic question.From all the tutorials and document that I have gone through for DRF, my understanding is that Token authentication is used to access the REST APIs. So, my question is, does DRF have such a user creation system, or is it only done through the Django User model, i.e. The

Re: First DRF project.

2021-03-17 Thread Kelvin Sajere
r...@gmail.com> wrote: >>>>>> >>>>>>> Hi KeLLs, I want to develop the website like you developed... >>>>>>> >>>>>>> Regards, >>>>>>> Ajay >>>>>>> >>>>>>>

Re: First DRF project.

2021-03-17 Thread Hasan Tareq
jaykumar...@gmail.com> wrote: >>>>> >>>>>> Hi KeLLs, I want to develop the website like you developed... >>>>>> >>>>>> Regards, >>>>>> Ajay >>>>>> >>>>>> On Thursday, March 1

Re: First DRF project.

2021-03-14 Thread Kelvin Sajere
5:30 kells...@gmail.com >>>>> wrote: >>>>> >>>>>> Good day everyone, >>>>>> >>>>>> I’ve been developing web applications in django since late 2019, I >>>>>> have done quite a number of proje

Re: First DRF project.

2021-03-14 Thread Uche Kelvin
t; On Thursday, March 11, 2021 at 3:51:43 PM UTC+5:30 kells...@gmail.com >>>> wrote: >>>> >>>>> Good day everyone, >>>>> >>>>> I’ve been developing web applications in django since late 2019, I >>>>> have done quite a

Re: First DRF project.

2021-03-14 Thread Kelvin Sajere
>> done quite a number of projects, but I always felt using django for just >>>> the backend and maybe a frontend framework for the frontend would actually >>>> be better. I decided to look into vue this January, and developed an app >>>> fo

Re: First DRF project.

2021-03-12 Thread ajaykumar...@gmail.com
using django for just >>> the backend and maybe a frontend framework for the frontend would actually >>> be better. I decided to look into vue this January, and developed an app >>> for listening, reading and sharing positivity. The backend is developed >>> with

Re: First DRF project.

2021-03-11 Thread Kelvin Sajere
y >> be better. I decided to look into vue this January, and developed an app >> for listening, reading and sharing positivity. The backend is developed >> with django and DRF, while the frontend is developed with Vuejs. It’s a >> PWA, so it comes installable on P

Re: First DRF project.

2021-03-11 Thread sakshi jain
ter. I decided to look into vue this January, and developed an app >> for listening, reading and sharing positivity. The backend is developed >> with django and DRF, while the frontend is developed with Vuejs. It’s a >> PWA, so it comes installable on Pc and Android devi

Re: First DRF project.

2021-03-11 Thread ajaykumar...@gmail.com
jects, but I always felt using django for just > the backend and maybe a frontend framework for the frontend would actually > be better. I decided to look into vue this January, and developed an app > for listening, reading and sharing positivity. The backend is developed > with d

First DRF project.

2021-03-11 Thread Kelvin Sajere
developed an app for listening, reading and sharing positivity. The backend is developed with django and DRF, while the frontend is developed with Vuejs. It’s a PWA, so it comes installable on Pc and Android devices. Check it out and let me know what you think. Thanks. https://divineword.life

Re: Filtering serializermethodfield in DRF

2021-02-24 Thread shreeh...@gmail.com
Okay, thanks for the help. On Wednesday, February 24, 2021 at 10:22:51 AM UTC+5:30 kunalsol...@gmail.com wrote: > I don't the exact use case here, but you can pass context while passing > data to specializer.And then use it inside creializer clas by self.context. > In this case you can pass quer

Re: Filtering serializermethodfield in DRF

2021-02-23 Thread Kunal Solanke
I don't the exact use case here, but you can pass context while passing data to specializer.And then use it inside creializer clas by self.context. In this case you can pass query params to context On Wed, Feb 24, 2021, 10:15 shreeh...@gmail.com wrote: > I have to filter my queryset based on a q

Filtering serializermethodfield in DRF

2021-02-23 Thread shreeh...@gmail.com
I have to filter my queryset based on a query param. I have to filter based on serializermethodfield. Any help would be appreciated. Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

DRF fetching issue with one to many relational data.

2020-10-12 Thread Md. Habibur Rahman
I don't get images in items objects. What mistake I have done, please me to find out. class RequestedItemImageSerializers(serializers.ModelSerializer): class Meta: model = RequestedItemImage fields = ['image'] class RequestedItemSerializers(serializers.ModelSerializer): i

DRF

2020-08-06 Thread Yann Mbella
Hi I need help to make a dynamic permission system using django permission according to groups -- 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+un

Re: help on creating user profile using drf

2020-07-28 Thread ola neat
sorry this didnt work, when i try this if created: instance.profile = Profile.objects.create(user=instance) instance.save() i couldnt even register any user On Mon, Jul 27, 2020 at 2:24 AM Fernando Hernandez wrote: > I think the issue is here instance.profile will be None first time the

Re: help on creating user profile using drf

2020-07-26 Thread Fernando Hernandez
I think the issue is here instance.profile will be None first time the CustomUser is created, you need to assign the created Profile to the instance and then save the user [image: image.png] try this if created: instance.profile = Profile.objects.create(user=instance) instance.save() On

Re: Custom-DRF-Response

2020-07-04 Thread Karthik Marudhanayagam
Hi, please refer https://stackoverflow.com/questions/47173483/django-rest-framework-custom-format-for-all-out-responses hope this helps. Best Karthik On Sat, Jul 4, 2020 at 5:30 PM Ronaldo Mata wrote: > Thx for your answer. 😁 > > but this brings me to the second point. If I do that I must to r

Re: Custom-DRF-Response

2020-07-04 Thread Ronaldo Mata
a will be inside data variable in the JSON response and i need > to add status variable and message to the JSON response. I can to rewrite > all Class Based Views of DRF to response with my desired format. but this > sound not very good. > > I can do this: > > def post(sel

Re: Custom-DRF-Response

2020-07-04 Thread Ronaldo Mata
I think that this not depend of my serializer. I only want that the response data will be inside data variable in the JSON response and i need to add status variable and message to the JSON response. I can to rewrite all Class Based Views of DRF to response with my desired format. but this sound

Re: Custom-DRF-Response

2020-07-04 Thread Julio Cojom
How is your model and your serializer? El sáb., 4 jul. 2020 a las 6:00, Ronaldo Mata () escribió: > Thx for your answer. 😁 > > but this brings me to the second point. If I do that I must to rewrite all > method in my API Class Based Views to response with this format. I think > that is not the be

Re: Custom-DRF-Response

2020-07-04 Thread Ronaldo Mata
Thx for your answer. 😁 but this brings me to the second point. If I do that I must to rewrite all method in my API Class Based Views to response with this format. I think that is not the best way to deal with this problem. What do you think? El sáb., 4 jul. 2020 a las 7:53, Arpana Mehta () escrib

Re: Custom-DRF-Response

2020-07-04 Thread Arpana Mehta
You can use a function which returns Response({'status': 'SUCCESS'}) On Sat, 4 Jul 2020, 03:24 Ronaldo Mata, wrote: > Hi Guys > > Somebody can help me? > > I want to create a custom response with the follow format: > > { > "status": true, > "message": "Any message", > "data": []} > > > bu

Custom-DRF-Response

2020-07-03 Thread Ronaldo Mata
Hi Guys Somebody can help me? I want to create a custom response with the follow format: { "status": true, "message": "Any message", "data": []} but I don't want create a custom_response function because I must to modified all Api class based views response. What is the best way to deal

Re: Why Should I use DRF over Django

2020-06-18 Thread maninder singh Kumar
DRF causes serialization of data and converts it to JSON, making it an efficient way to communicate with your frontend. An API allows you to build a common core that can be used on multiple platforms like websites, mobile applications, plugins, and so on. You can build an API with pure Django too

Re: Why Should I use DRF over Django

2020-06-18 Thread Andréas Kühne
Like Shishir says it's not using DRF instead of django, It's DRF on top of django. The main reason for using DRF instead of using django by itself is that you get an enormous consistency. Serialization is really simple, you get validation on all fields with valid JSON results. You get

Re: Why Should I use DRF over Django

2020-06-18 Thread Shishir Jha
Its not that use drf "over" django. Its like you use drf "with" django. Whenever you want to create rest api, django rest framework is the library created to do that more usually. Django on the other end is a framework to create web application. There is never the case when y

Why Should I use DRF over Django

2020-06-18 Thread Rajprabhu Arulnathan
Apart from Rest API & serializer why I should use DRF over Django Because We could write what we want in Django & I want to know the advantage of using DRF over Django -- You received this message because you are subscribed to the Google Groups "Django users" group. To uns

  1   2   >