Questions tagged [django-users]

User model is the default model in Django. It provides many APIs which are helpful for working with users. Django user model is overridable in a Project according to required field.

Django(a high-level Python Web framework) comes with a user authentication system. It handles user accounts, groups, permissions and cookie-based user sessions.

894 questions
3
votes
1 answer

How to extend UserCreationForm with fields from UserProfile

I found this post on how to extend the UserCreationForm with extra fields such as "email." However, the email field is already defined in the pre-built user model. I created an extra model (called UserProfile) that futher extends Django's pre-built…
goelv
  • 2,774
  • 11
  • 32
  • 40
2
votes
1 answer

What is better way to have multiple type of member profiles in django

I see another question on stackoverflow.com whose title seems similar but that doesnot fulfil my requirements and my users are very different so only different roles will may be not work well. I have scenario of job portal where one type of user is…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
2
votes
2 answers

Saving django model forms data before user signs up

I am using django model forms, the form can be filled even by users who have not signed up, but the submission requires the user being signed up. Here is my models: class Study(model.Model): marksobtained = models.CharField(max_length=5) …
user993563
  • 18,601
  • 10
  • 42
  • 55
2
votes
3 answers

How to use django-postman to provide each user the capability to send messages

I am trying to use django-postman and I have successfully integrated it with my project. I want to use this application to give each user the ability to send messages to other users. Can anybody point me in the right direction to do this thing.
Sachin
  • 3,672
  • 9
  • 55
  • 96
2
votes
1 answer

How to extend Django User model to manage permissions

I am working on a web-app using Django 1.3 and Python2.6. I have to extend the Django User model such that there are three types of users and manage permissions for each type. To elucidate, say there are three types of Users: Faculty, TAs and…
pcx
  • 984
  • 11
  • 21
2
votes
1 answer

Python django Usermodel extending to custom user model

The problem is i need an extra field to add my Django usermodel via a custom user model called 'is_admin' so ,this is the code i added to model class CustomUser(AbstractUser): is_admin = models.BooleanField(default=False) but i registered this…
2
votes
0 answers

Missing double authentication with User Models in Django

I want to make my first student's project in Django and I am trying to make a management system that has two authentications from one site. I want to have a staff sign-up form and a customer sign-up form if it's possible. I made one AppBaseUser…
ReniBo
  • 21
  • 1
2
votes
1 answer

The model User is not registered (django-4 admin.py)

I'm trying to give User (django's default, not custom model) an Address in the admin view. I am working for the first time with different versions of django in different projects, I do the same in Django 2 and it works, and here I use Django 4. This…
Vicente
  • 31
  • 4
2
votes
2 answers

Django Framework Rest match calendar users with current user

I am doing an exercise where the goal it's to match my current calendar with other users. To do this, I created a UserProfile App and Schedule App. Each user has a profile that can have multiple intervals. Considering my current calendar: { "count":…
user4990969
2
votes
1 answer

The field items.Item.owner was declared with a lazy reference to 'items.user', but app 'items' doesn't provide model 'user'

I have extended User Django model using AbstractUser and I have pointed AUTH_USER_MODEL = 'items.User' in my settings/base.py, then I repointed all the FK to 'items.User'( was User before the change), but I am getting this error in every class I…
Yusuf
  • 2,295
  • 7
  • 15
  • 34
2
votes
0 answers

Implementing User specific password expiry in Django ( eg resetting every 90 days for subset of customers)

The Django app I'm building will need to accept different security policies from different User Groups. One such policy is having a customizable password-expiry rule for different users. I've looked at django-allauth and other common authentication…
2
votes
1 answer

Django user authentication with case insensitive username

I'm completing my first project in Django, I'm still struggling when I need to find documentation about the problem that I cannot manage to solve, then I thought to post a question here. In my django project I installed the app "users" for the…
Red
  • 63
  • 6
2
votes
1 answer

Django Custom User Manager is not called in admin panel

I am implementing a custom user model using AbstractBaseUser and BaseUserManaer . class UserManager(BaseUserManager): def create_user(self,username,password=None): class User(AbstractBaseUser): ... objects = UserManager() When I am…
skg_9
  • 59
  • 5
2
votes
0 answers

Django Rest Framework admin panel not using custom User Manager

I have implemented a CustomUser and CustomUserManager in my DRF app. The tutorials I have followed are this one and this one, which are nearly identical approaches to creating a custom user and custom user manager. I placed a print statement in the…
2
votes
1 answer

How to filter active users connected using an extended model class field

I have extended the user model to a model class 'Student' using OneToOne relation. Now I want to filter all active students with a field in the 'Student' class such as 'name'. Tried this in django shell: Student.objects.filter(user.is_active ==…