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
-1
votes
2 answers

username field in django sign up form

I use from django.contrib.auth.forms import UserCreationForm in forms.py for creating sign up form. first I register with a username, for example ali and again when I try to register with Ali it allows me to create user. how can I prevent…
Ali Soltani
  • 589
  • 1
  • 7
  • 21
-1
votes
1 answer

how to redirect different types of pages for different users after login in django

I have created two different types of users - truck & company using Django. Here is my registration page of a user Registration Page After registering, the data about whether the user is a truck or company will go to the database. In my login page, …
-1
votes
1 answer

Unicode issue updating User model with a custom Form

Tryng to update User model and UserProfile model I diceded to generate a form with User and UserProfile models attributes, to update both with the same form. But when i subbmit the form to the view, the Users model is updating with no unicode…
andre
  • 192
  • 2
  • 12
-1
votes
1 answer

Django custom user authentication NoneType error

I am trying to make a simple user registration form for a django site. Here is the goods models.py from django.db import models from django import forms from django.conf import settings from taggit.managers import TaggableManager from…
dirtshell
  • 161
  • 2
  • 12
-2
votes
1 answer

How to get email address of all users in Django

I am learning django and I am stuck with this problem. How do I get the email address of all the users in Django. The user can be of any type like superuser, general user etc. I tried the following but I am not getting email address of all the…
Anshul Gupta
  • 265
  • 2
  • 12
-2
votes
1 answer

Django - How can I "upgrade" user type?

I have two models, Buyer and Merchant with the default user type after the account creation being Buyer. # Abstract User class User(AbstractUser): is_buyer = models.BooleanField(default=False) is_merchant =…
static-man
  • 29
  • 7
-2
votes
1 answer

Django on different user login render different html pages

I am using Django. I am using inbuilt auth .user of django for person login. I have extended the auth.user with model profile(containing role and image) models.py is as below: from django.contrib.auth.models import User class…
-2
votes
2 answers

NoReverseMatch at /account/

im having a hard time to debug this error... The error is this: Environment: Request Method: GET Request URL: http://127.0.0.1:8000/account/ Django Version: 2.0.3 Python Version: 3.6.9 Installed Applications: ['django.contrib.admin', …
-4
votes
1 answer

How can I allow spaces in the default django user model username?

I am trying to allow spaces in the django user model, I tried overwriting its validator and it still does not work.
1 2 3
59
60