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
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
@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
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
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
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
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
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
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
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
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
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
12 matches
Mail list logo