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
0
votes
1 answer

Allowing a user to schedule an event and have it linked to their account information for use in a django template

I've looked into the answers posted to similar questions but I couldn't get anything to work for my situation, so I will post my question. The way I have it, I always get the result "None" when I try to get the first name of the user who created an…
0
votes
0 answers

A Django form is automatically being populated with another user's email address

This one is blowing my mind and freaking me out to about the same degree. I have a signup page here: http://eatfeastly.com (I restarted the server on midnight, Aug 15, which temporarily fixes the problem, so you may need to wait to see the…
Jeff May
  • 457
  • 2
  • 16
0
votes
1 answer

How to make customer's email as the username in UserCreationForm / User Model in Django?

I'm using the UserModel and the UserCreationForm in Django. However, instead of requiring a username, I want to use the customer's email as the login information (i.e. completely bypass / ignore the username field). How do I go about making the…
goelv
  • 2,774
  • 11
  • 32
  • 40
0
votes
3 answers

How to save data in backend/database for UserProfile in Django

My intention is to create a user profile using Django's User model and a UserProfile model (which basically adds details / fields about the user). I then want to create a registration form that asks to fill fields that are contained in both the User…
goelv
  • 2,774
  • 11
  • 32
  • 40
0
votes
3 answers

How to refer to fields in Django's User model?

I have the following models.py class UserProfile(models.Model): user = models.OneToOneField(User) url = models.URLField(blank=True) address=models.CharField(max_length=60) location = models.CharField(max_length=30) join_date =…
goelv
  • 2,774
  • 11
  • 32
  • 40
0
votes
2 answers

How to write user specific views?

I have a written views in django where i have more than one tab on the web page. Some of them I want to make invisible for those user whose is_staff status is False. Following is the code TOP_NAVIGATION_BAR = [ {'name':'home',…
Karan
  • 239
  • 4
  • 13
0
votes
1 answer

Django redirect shortcut changes request.user

I have an application where we have sub-classed the Django 'User' object into, say, 'AppAccount' object which has additional attributes. Now I have a view where I do the following: appAccountObject.backend =…
Gaurav Dadhania
  • 5,167
  • 8
  • 42
  • 61
0
votes
1 answer

How can I check if the groups of a user in django changed?

I placed a breakpoint inside my handler invoked by: def handle_user_save(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) EmailNotifications.objects.create(user=instance) else: …
TheOne
  • 10,819
  • 20
  • 81
  • 119
0
votes
1 answer

Django: hint for isolating data among set of users

I want to build a Django application in which each "set of users" can see different data, as they were using different DBs. Is there any best practice to achieve this? E.g. user A, after logging, sees and manages his own data, with no possibility…
Don
  • 16,928
  • 12
  • 63
  • 101
0
votes
1 answer

Do I need to override save method to add data to different models from django UserCreationForm

I want to add another field in UserCreationForm to be shown in RegistrationForm , I saw a couple of examples on stackoverflow for that purpose. I mean the examples by defining different RegisterForm inherited from UserCreationForm as explained in…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
0
votes
2 answers

FieldError with keyword 'username' when trying to create a user with Django

My Models.py, Here I'm using OneToOneField here, to extend StudentProfile. from django.db import models from django.contrib.auth.models import User, UserManager class SecretQuestion(models.Model): question = models.CharField(max_length=200) …
JohnRK
  • 105
  • 1
  • 7
0
votes
1 answer

populating multi-table inherited models in django

I am using models in following way: class UserProfile: # Some Stuff class CompanyProfile(UserProfile): # Some more stuff class CandidateProfile(UserProfile): # Even more stuff mean CompanyProfile and CandidateProfile are inheriting from…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
0
votes
1 answer

better architecture in django is different apps. or single App for different components?

I have intended to have an app. where I want to have different things having relations with each other and want to know that whether I should have them as just different models or as differnt apps. Obviously if this is student, teacher in LMS then…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
-1
votes
1 answer

Django - How can I add a user to an auth_group?

I have and django application that I am trying to apply user group permissions. Here is how my members model is setup. Class Member(AbstractUser) Class Meta: permissions = ((Perm1_codename, Perm1_desc),...) pass address =…
quasar
  • 3
  • 1
-1
votes
1 answer

Can I implement separate user authentication and models for two apps in django project?

In this django project I have two separate applications that I need to keep user account information separate. For example, if a person creates an account for app A, I need them to be able to make a separate account (with the possibility of using…