Questions tagged [django-custom-user]

Tag for questions related to custom User model functionality introduced in Django 1.6

268 questions
0
votes
1 answer

Can't access current CustomUser in Django View but works in Template

I'm building a project in Django starting with DjangoX and am simply trying to get the currently logged in username or userid. I've tried all kinds of combinations and approaches, some of them I've left in comments, based on other on-line questions…
S Shepard
  • 3
  • 1
0
votes
1 answer

Why do we have to include staff and admin fields in custom user django model?

Let's say I am building a social networking website that has nothing do with admin and superuser. But I still have to include these fields while making custom user model. This is going to be a simple model that has user's profile information not…
Casper
  • 77
  • 4
0
votes
1 answer

Change Passwod API using Django Custom user model and serializer

I have a Django application hwere I have extended the User model and created a custom user model for registration/login, now I want to implement a Change Password API which will be used in Android/IOS app development. I would get parameters…
Reema Parakh
  • 1,347
  • 3
  • 19
  • 46
0
votes
1 answer

django 2 Custom User: Attribute Error (password not passing/hashing properly)

I have implemented a custom user setup for django 2. However I can't seem to find out source of this error that occurs anytime I attempt to register. AttributeError at /register/ 'AnonymousUser' object has no attribute '_meta' When I get this…
sgt_disco
  • 173
  • 1
  • 11
0
votes
1 answer

Django custom user model issue

I am trying to customize user model (name: UserProfile) but when I did makemigrations I got an error: AttributeError: Manager isn't available; 'auth.User' has been swapped for 'accounts.UserProfile' so I follow the suggestion from (Manager isn't…
0
votes
0 answers

Django Custom User with Foreign Key. How to display foreign key in form?

I have the following two models: class CustomUser(AbstractUser): objects = CustomUserManager() class Meta: ordering = ['nin'] verbose_name = 'User' verbose_name_plural = 'Users' username = None name =…
Alex
  • 2,270
  • 3
  • 33
  • 65
0
votes
2 answers

OperationalError at /admin/ no such table: IEL_user when browse for admin

I have a error which I am unable to detect, I am learning Django, at start I was working with Django default user model, but then I need to have a custom user model, so I have dropped my db(deleted sqlite db file), make new user model in models.py…
Nabeel Ayub
  • 1,060
  • 3
  • 15
  • 35
0
votes
1 answer

Creating custom user model when a new user is created with Django-rest-auth

I'm building a DRF app with Django-rest-auth implemented for social login. The problem I'm having now is that I want to extend my User Model, but I'm afraid if I change the User Auth Model migrations will complete destroy my project due to the…
0
votes
1 answer

How to add security questions in Django based web server using Custom User(derived from AbstractBaseUser)?

Can someone help me with code for forms.py views.py and urls? views.py def PasswordRecover(request): if request.method=='POST': form=UserGet(request.POST) user= form.save(commit=False) if(user.is_active): …
manjy
  • 109
  • 1
  • 2
  • 12
0
votes
2 answers

Storing additional information in django using absrtactuser

I have created custom Userclass in django(AbstarctUser). Everything works fine but my password is getting stored as plain text in database even after registering in admin.py. I do not have any forms.py explicitly defined. Also I am using nested…
Rashmi
  • 15
  • 8
0
votes
1 answer

Django: Unable To Replace The Default User Model With Custom User Model

I am unable to replace default django user model with my own custom user model. yes, i have AUTH_USER_MODEL = 'appName.modelName' set in settings.py here's my code settings.py INSTALLED_APPS =…
0
votes
1 answer

Getting type error while trying to authenticate user

I'm trying to authenticate users using a custom MyUser model in Django version 2.0.4. However, when the code hits the check_password line in my custom backend module, I get this error: Error Traceback: Traceback: File…
K. John
  • 129
  • 1
  • 12
0
votes
1 answer

unable to log in using curl and django JWT even though credentials correct

I have a custom user model in django here: class UserManager(BaseUserManager): def create_User(self, email, name, companyname=None, userphoto=None, userphotokey=None, signupvalidatestring=None, is_active=False, phone=None,…
user9487981
0
votes
0 answers

ImportError: cannot import name 'FieldPanel' (Wagtail)

When I try to make an abstractUser Model Class I get this error message after I put AUTH_USER_MODEL = 'blog.User in my settings.py I followed the Wagtail custom user model example The Link to the site. I'm using Django 1.11.3 and wagtail 2.0, python…
0
votes
0 answers

Django: Cannot assign "'prof'": "coach.user" must be a "CustomUser" instance

I'am developing a website in Python Django. I have two "class CustomUser" it is used in order to login and another "class coach", this class contains information about users. I need to match these two class. My website identify the user who is…
Nikita
  • 75
  • 1
  • 10