Re: Custom user model password is not hashed

2023-01-26 Thread Namanya Daniel
Did you try make_password before saving data from registration form ? On Wed, 25 Jan 2023 at 18:36, Roger Mukai wrote: > @Tejas or @Sebs, do you still have a question how to do this? I think I > figured it out > > On Tuesday, December 6, 2022 at 7:25:08 PM UTC-5 sebs...@gmail.com wrote: > >> Hey

Re: Custom user model password is not hashed

2023-01-26 Thread James
Yup, 100% correct. Glad to hear you fixed it. Custom user models that inherit from the abstractbaseuser class can be a little tricky at first. On Friday, November 13, 2015 at 5:41:09 AM UTC-7 benjamin...@gmail.com wrote: > The problem was, when creating a custom user, one has to define a custom

Re: Custom user model password is not hashed

2023-01-25 Thread Roger Mukai
@Tejas or @Sebs, do you still have a question how to do this? I think I figured it out On Tuesday, December 6, 2022 at 7:25:08 PM UTC-5 sebs...@gmail.com wrote: > Hey *Ben*, please help with the repo for the same code. I'm getting same > error > here. > > On Saturday, 7 May 2022 at 22:37:32 UT

Re: Custom user model password is not hashed

2022-12-06 Thread Sage
Hey *Ben*, please help with the repo for the same code. I'm getting same error here. On Saturday, 7 May 2022 at 22:37:32 UTC Tejas Agrawal wrote: > Hey Benjamin, can you please share your github repo for the same code. I'm > also getting the same error in one of my project, can't figure out how

Re: Custom user model password is not hashed

2022-05-07 Thread Tejas Agrawal
Hey Benjamin, can you please share your github repo for the same code. I'm also getting the same error in one of my project, can't figure out how to solve it. On Friday, November 13, 2015 at 6:11:09 PM UTC+5:30 benjamin...@gmail.com wrote: > The problem was, when creating a custom user, one ha

Re: Custom user model password is not hashed

2015-11-13 Thread Benjamin Smith
The problem was, when creating a custom user, one has to define a custom model form and model admin that handles the password properly. After that it was solved. Thank you. On Thu, Nov 12, 2015 at 9:25 PM, Andreas Kuhne wrote: > Try to debug and check what your password value is after the > set

Re: Custom user model password is not hashed

2015-11-12 Thread Andreas Kuhne
Try to debug and check what your password value is after the set_password() statement. Also have you checked the database after trying to create a user with the new method? It should be hashed in the database. This is stuff that should "just work" in django (it's regulated by the AbstractBaseUser

Re: Custom user model password is not hashed

2015-11-12 Thread Benjamin Smith
I have changed user.set_password(self.cleaned_data["password"]) to user.set_password(password). But I am getting the same result. On Thu, Nov 12, 2015 at 8:57 PM, Andreas Kuhne wrote: > As aRkadeFR says, you seam to have mixed code there > > The row: > user.set_password(self.cleaned_data["pa

Re: Custom user model password is not hashed

2015-11-12 Thread Andreas Kuhne
As aRkadeFR says, you seam to have mixed code there The row: user.set_password(self.cleaned_data["password"]) is taken from a form somewhere and won't work. It should instead be : user.set_password(password) I suppose the password is going through to the create method via the kwargs argument

Re: Custom user model password is not hashed

2015-11-12 Thread Thorsten Sanders
If you wanna set the password yourself you need to generate it: https://docs.djangoproject.com/en/1.8/topics/auth/passwords/ scroll down to the bottom and have a lookt at make_password Am 12.11.2015 um 16:11 schrieb Benjamin Smith: I have my own custom User model, and its own Manger too. Mo

Re: Custom user model password is not hashed

2015-11-12 Thread aRkadeFR
Hello, I don't quite get the code in your method: 'MyUserManager.create_user': user.set_password(self.cleaned_data["password"]) You're in your Manager method but call self.cleaned_data ? You can set a breakpoint inside your method with pdb to see what's going on with your fields? On 11/12

Custom user model password is not hashed

2015-11-12 Thread Benjamin Smith
I have my own custom User model, and its own Manger too. Models: class MyUser(AbstractBaseUser, PermissionsMixin): email = models.EmailField(max_length=255, unique=True) first_name = models.CharField(max_length=35) last_name = models.CharField(max_length=35) username = models.Char