Tag for questions related to custom User model functionality introduced in Django 1.6
Questions tagged [django-custom-user]
268 questions
0
votes
1 answer
Restricting accesses on views based on the custom user type in Django
I created a custom user using AbstractUser with 3 user types
USER_TYPE = (
("type1", "type1"),
("type2", "type2"),
("type3", "type3"),
)
class User(AbstractUser):
user_type = models.CharField(max_length=50, choices=USER_TYPE,…

Varniks
- 199
- 4
- 15
0
votes
1 answer
Django Social Auth - Google: AttributeError: 'NoneType' object has no attribute 'provider'
I am receiving this error when trying to login via google, I've tried just about everything I can think of and similar issues on SO don't seem to help. I have a custom user model setup as such:
models.py
from django.contrib.auth.models import…

dataatallured
- 33
- 1
- 7
0
votes
1 answer
how can i sign up with custom user model (One By One Type) in django?
how can i create a correct sign-in And sign-up with custom user model(OneToOneField) in django ?
im using normal HTML form .
im using Django 2.2.3 .
my database is Postgeres.
hi, i created a website that sign in and sign up where ok , But ... i…

Hossein
- 11
- 1
- 7
0
votes
1 answer
Django Heroku users_customuser table can't migrate
I have a Django project I've been developing locally for a while. It works fine on my local machine, and I am using a customuser setup so that my login auth only needs email / password, as opposed to the default Django user table which needs email /…

Martin
- 1,336
- 4
- 32
- 69
0
votes
0 answers
How to override Django allauth to customize registeration?
I'm having trouble customizing the allauth registration module, where I cannot get rid of the Username field. I did take all required measures in the settings.py file to override it, for instance :
"""
Django settings for mackta project.
Generated…

Jesse Cho
- 1
- 1
0
votes
1 answer
Django Models: Create custom User model when I create a normal User
I have a model called 'User profiles' that is a custom user, it takes a user in a OneToOneField and also has additional fields like 'age', 'is_teacher', 'is_location'.
My Problem is that when I create a normal user, this 'User Profiles' dosen't…

William Abrahamsson
- 229
- 1
- 6
- 19
0
votes
1 answer
Custom User model error on changing password form through admin interface
Trying to set up custom user model on the start of django project, but i am facing a recurrent problem that i have only been able to patch, that now is affecting the changepassword of admin interface. On change password form submit, it crashes with…

Manuel Herrera
- 176
- 7
0
votes
1 answer
Styling the custom user registration forms in django
I have created custom user registration. I would like to style them using input placeholders and class names.
models.py
from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
…

charitha reddy
- 37
- 1
- 6
0
votes
1 answer
How to get custom user model's custom fields in Django
I've created one custom user model as below
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
bio = models.TextField(max_length=500, blank=True)
location = models.CharField(max_length=30,…

Jadeja Rahulsinh
- 47
- 8
0
votes
1 answer
How to login automatically after signup in django customuser?
So I followed a tutorial online about creating a customuser registration/login in django. Now both works fine. when user logs in from login page it uses this link LOGIN_REDIRECT_URL = 'profile'. But for a user that just registered I want it to be…

thirteen4054
- 465
- 4
- 17
0
votes
0 answers
is_active is not changing when custom user logged out
I am working on custom user model, but the logout feature is not synchronized with root password. is_active(here activated) variable is not changing to False when I logout and the superuser logged in Django admin gets logout when logout button is…

VA splash
- 553
- 1
- 8
- 25
0
votes
1 answer
TypeError at /signup 'NoneType' object is not callable in Django
Have custom User model, but using this model I can only create superuser using terminal command "python manage.py createsuperuser".
The error : "TypeError at /signup 'NoneType' object is not callable"
Traceback:
1
userV=…

VA splash
- 553
- 1
- 8
- 25
0
votes
1 answer
login in django using email or username (custom user model)
i am new to the django. i want that user is able to login using username or email. i am using custom user model. register page is working properly but in login while submiting login data i am getting errors.
my code is not working. i do not know how…

Anuresh Verma
- 818
- 1
- 13
- 30
0
votes
1 answer
Cannot create superuser in Django
I wanted to use email instead of username to login. But while creating superuser I am getting the following error
TypeError: create_superuser() missing 1 required positional argument: 'username'
users/view.py
from django.shortcuts import…

Pritam
- 333
- 3
- 13
0
votes
0 answers
How to create Django Custom User model where a single user will have multiple profiles
Hello I am new to programming and learning.
I am having some problem in decision making for the user model in Django.
Below is the description of my project which i want to do. Please suggest me the best way to go about it.
I will have an…