Skip to content
loading...

The Django Rest Custom User Model and Authentication

Tarush Nagpal on July 22, 2018

I was recently building a website for one of my clients by using the Django rest + React framework ( which is beautiful by the way ) and encounte... [Read Full]
markdown guide
 

Thanks for this nice tutorial! Can you provide some info on how to update fields on the registration serializer (CustomRegisterSerializer) so it won't display the inherited fields from the parent class in the browsable API.

 

Hi Tarush,

   Would you show me, how to integrate react js with django ?
 

Hi! There are multiple ways to do so, In the scenario for this post I had deployed my django app as a REST API and then made POST/GET Requests from my react app to django, It's makes communications very simple and straight forward.

 

I think you're a little confused, nginx is a web server which mostly helps us while we're hosting it somewhere. To "integrate" frontend and backend you just need to make POST/GO requests from the frontend to the backend

 

great post Tarush! would you make a post explaining how to do the same but with having the user profile as a separate model?

 
 

I'm sorry but I just see one model here:
class User(AbstractBaseUser)

 

You should make it clear, that you will use which library for a faster reading =)
Not bad post anyway!

 

Hi Tarush,
Would you kindly assist in creating a login Serializer ,model and View for users to login with token authentication? But Custom based Models. I'm a bit stuck somewhere

 

hi Tarush i need your help with one of my Drf react project i just wanted to tweak a few things but i am not able to do that because i am a newbie to Django rest framework

 
 

Great Article. Thanks for sharing.
Instead of username being email address what if you wanted to use phone number ?
What other changes would one need to make ? Thanks

 

Thanks for the explanation.
can you tell me how can I add an image filed in it.
I need to upload user's profile picture

 

Just check out the Django documentation, they have a great example and explanation.
docs.djangoproject.com/en/2.2/

code of conduct - report abuse