Tag for questions related to custom User model functionality introduced in Django 1.6
Questions tagged [django-custom-user]
268 questions
1
vote
1 answer
Django Custom User UUID Duplicated (cached?)
I'm Using Django with a custom user model with custom UUID and custom user manager:
class CustomUser(AbstractUser):
id = models.UUIDField(primary_key=True, default=generate_id(), editable=False)
# ...
As you can see, I'm NOT using…

Fabio Magarelli
- 1,031
- 4
- 14
- 47
1
vote
0 answers
django RecursionError : maximum recursion depth exceeded while calling a Python object
I have implemented membership by building a custom user model in the django rest framework. By the way, the following error occurs when you code and run the server.
RecursionError : maximum recursion depth exceeded while calling a
Python…

leedjango
- 411
- 2
- 9
- 18
1
vote
3 answers
Can't create Super user in Custom Multi User
I was trying to implement registration for 3 types of users: Parent, School and Vendor.
from django.db import models
from django.contrib.auth.models import (AbstractBaseUser, BaseUserManager)
class UserManager(BaseUserManager):
def…

Azamat Uzbekov
- 150
- 12
1
vote
1 answer
django save() takes 1 positional argument but 2 were given
I'm producing django rest auth custom user. After implementing and testing the serializer and view for membership registration, the following error appears after pressing post:
TypeError at /signUp save() takes 1 positional argument but 2 were…

leedjango
- 411
- 2
- 9
- 18
1
vote
1 answer
Facebook Login with custom user model
m trying to create a new user with Social-Auth and my custom user model required a phone number but facebook does not allow it
so i get this error
TypeError at /social-auth/complete/facebook/
create_user() missing 1 required positional argument:…

YahyaST18
- 101
- 1
- 10
1
vote
3 answers
ValueError at /register/ Users must have an email address
This is my code in views.py
if form.is_valid():
print(form.cleaned_data)
username = form.cleaned_data.get("username")
email = form.cleaned_data.get("email")
password = form.cleaned_data.get("password")
…

Ross Symonds
- 690
- 1
- 8
- 29
1
vote
0 answers
LookupError: App 'Hierarchy' doesn't have a 'CustomUser' model
I've been following the Django documentation to create a custom user model.
Here is the main error -
(Edit - I was asked to add the entire traceback so here it is)
Watching for file changes with StatReloader
Exception in thread…

Arny Boy
- 61
- 2
- 10
1
vote
2 answers
Using custom user model in Django always return anonymous user in template
I have created a custom user model since I need three information( email, institute id, password) to login to the system. I have also created an authentication backend for this purpose. when I try to login, it redirects to the correct view. But the…

reasm001
- 167
- 1
- 11
1
vote
2 answers
Django admin not allowing superuser to log in (Custom User Model)
I have created a custom user class which appears to be working correctly however whenever I try to log in to the admin, I keep getting the following error on the login page:
Please enter the correct username and password for a staff account. Note…

brandonris1
- 455
- 3
- 9
1
vote
2 answers
I cant pass all vaues from extra feilds in django Rest allauth framework for custom user model
I created Django custom user model and added restframework to it. Custom User fields are fname, lname, email,username,password,phone ,gender,acctype.
when I register user through the Django restframework, it only takes username,email and password…

Abhiram P Jayan
- 339
- 5
- 16
1
vote
0 answers
Making password required for admins, but unusable for users
I am trying to implement a Django backend for a mobile app where users authenticate through their mobile numbers only. When the user tries to login, the backend will send him an OTP so that he can login. For this use case, I think I don't need a…

Ambitions
- 2,369
- 3
- 13
- 24
1
vote
1 answer
authenticate(request, username=username, password =pswd) returns None for custom user model
The authenticate() function is returning none for registered users in mySQL db.
I am using custom user verification, in which the registeration process works perfectly.
I am using Django 3.0
The value of
Account.objects.get(username =…

Suraj Ingle
- 372
- 4
- 18
1
vote
0 answers
CustomUser on separate database issues
I want to use the users from a legacy database but keep everything else on the 'default' database.
The main issue I have atm is that I can't get the database router to properly forward queries to the appropriate database. Namely when I run the…

Pithikos
- 18,827
- 15
- 113
- 136
1
vote
1 answer
Use email as authentication field and add email verification on django custom user model
I have this custom user model on my Django project. I want to make the email as authentication field instead of the username. Also, I want to perform an email verification.
models.py
class es_user(models.Model):
user =…

Adarsh D
- 511
- 6
- 14
1
vote
0 answers
Django User model with encrypted and hashed email as username
I have a custom User model with email as username.
I have encrypted the email field to be in conformity with GPDR (I will hold a lot of personal information).
I have added a email_hash field with index on it for the database to be able to retrieve…

Stygmate
- 61
- 2
- 5