Tag for questions related to custom User model functionality introduced in Django 1.6
Questions tagged [django-custom-user]
268 questions
2
votes
1 answer
Using multiple login fields, email or phone number in Django All Auth
I am using Django All Auth to authenticate user but I need to use phone number or email field when logging in user. I extended user class as follows:
class User(AbstractUser):
phone_number = models.CharField(max_length=10, unique=True)
def…

indexOutOfBounds
- 541
- 7
- 27
2
votes
1 answer
AttributeError: Manager isn't available; 'auth.User' has been swapped for 'custom_user.CustomUser'
I get the error after try to solve User Registration with error: no such table: auth_user
by following Manager isn't available; User has been swapped for 'pet.Person'
i still cannot register user using my custom user registration form and i have…

nuradilla
- 115
- 2
- 5
- 15
2
votes
1 answer
How to solve error raised : No module named 'django.contrib.customuser'
I am new to Django, trying to create a custom user for my project. When I am running the server, it raises No module named 'django.contrib.customuser' and sometimes, Manager isn't available; auth.User has been swapped for Mysite.CustomUser. Even i…

vanam
- 135
- 1
- 4
- 14
2
votes
0 answers
Create registration form for extended User model in Django 1.8
I am creating a registration form so users can sign-up.
models.py
class UserProfile(models.Model):
user = models.OneToOneField(User)
address = models.CharField(max_length=100)
I'm not sure what should go in the forms.py and views.py since…

GusGus
- 230
- 6
- 16
2
votes
2 answers
Django rest framework not authenticating custom user model
I have this custom user model:
class CustomUser(AbstractBaseUser,PermissionsMixin):
email = models.CharField(max_length=255, unique=True)
....
And this view that is supossed to require authentication in order to…

Kilian Perdomo Curbelo
- 1,281
- 1
- 15
- 31
2
votes
1 answer
Is it required to make a custom manger for a custom user model in django
I am making a custom user model using the AbstractBaseUser and PermissionsMixin by following these two tutorials (tutorial-1 and tutorial-2).
This the model so far:
class User(AbstractBaseUser, PermissionsMixin):
email = models.EmailField('email…

Benjamin Smith Max
- 2,668
- 8
- 33
- 56
2
votes
1 answer
Cannot create super user use custom user model in django 1.8
i try to make custom user model and i want to make super user but i am getting error like this
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File…

User0511
- 665
- 3
- 11
- 27
2
votes
2 answers
Custom User Testing in Django
I have a Django application and the custom user - want to test it (do unit testing). My custom user is emailuser, which consists of e-mail and password fields. I want to set up something of such national mplayer, give it a field and a password. But…

mark
- 653
- 1
- 10
- 23
2
votes
0 answers
authenticate a user in django pybb app
I have successfully installed pybb app and all is good except the fact that I don't how to 'tell' pybb app that a user has been authenticated by my main app. I'm using function based views and the normal authenticate -> login routine as described…

michaelmwangi
- 284
- 1
- 2
- 13
2
votes
0 answers
Django custom user migrations breaks syncdb
In my django project I swapped the django auth user for a custom user model from the start. I use a proxymodel for the user as the AUTH_USER_MODEL.
The project layout is somewhat like so,
manage.py
project/
__init__.py
settings.py
…

sowa
- 1,249
- 16
- 29
2
votes
1 answer
Django best practice - referencing custom user or profile model
Based on Django's recommendation that information should be stored in a separate model if it's not directly related to authentication, I've created both a custom user model and a profile model in my app.
Something like:
class…

Ben
- 6,986
- 6
- 44
- 71
2
votes
2 answers
Reasons to use 'through' parameter on an M2M relationship in Django
Concise question:
What are the advantages and disadvantages of Modeling a many-to-many relationship in Django (1.5) on an external table without using the through parameter?
Details:
Say, I have a custom User model UserProfile and I want to define a…

Leonardo
- 4,046
- 5
- 44
- 85
2
votes
1 answer
Custom users with django allauth
I am trying to use a custom user with django-allauth/social auth
In settings.py, I have
AUTHENTICATION_BACKENDS = (
# Needed to login by username in Django admin, regardless of `allauth`
"django.contrib.auth.backends.ModelBackend",
#…

ninajay
- 527
- 1
- 5
- 10
2
votes
0 answers
django 1.5 custom user - separate application in admin
I've created a custom user model as described in docs.
models.py
class Account(AbstractUser):
middle_name = models.CharField(_('middle name'), max_length=30, blank=True)
is_partner = models.BooleanField(_('partner status'), default=False,
…

Digital God
- 471
- 1
- 5
- 17
1
vote
0 answers
Login Authentication for custom user model
I have custom user model. I am able to signup but when it comes to login and logout, i have no idea what is happening. Login Form is not logging in the user when I submit the form, it just says the user with that username already exists (it is kind…

Rahul
- 17
- 6