Re: In need of immediate help from Django community

2021-05-25 Thread Aritra Ray
Thank you for your response. It worked out perfectly. On Tue, 25 May, 2021, 4:39 am Kelvin Sajere, wrote: > Import the User model in your forms.py and use it instead of Profile. As > the error clearly states, the Profile model does not have a username field. > Django actually recommends using

Re: In need of immediate help from Django community

2021-05-24 Thread Kelvin Sajere
Import the User model in your forms.py and use it instead of Profile. As the error clearly states, the Profile model does not have a username field. Django actually recommends using the AbstractUser, or the AbstractBaseUser to extend the default User model if you wish to create something like a

Re: In need of immediate help from Django community

2021-05-24 Thread Omkar Parab
Error is in forms.py file. "model = User" not profile. Default "User" model comes with username, email filed. Why you're creating another email field in the Profile model? Just fetch it using {{ user.email }} On Tue, May 25, 2021, 1:38 AM Aritra Ray wrote: > Hi, > > I've been facing a

Re: In need of immediate help from Django community

2021-05-24 Thread Mottaz Hegaze
I think in second image ( usercreateform ) your model needs to be User not profile On Mon, May 24, 2021 at 10:08 PM Aritra Ray wrote: > Hi, > > I've been facing a problem recently in creating a Django Profile model for > an E-commerce website. > Error: FieldError(message)