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

Django User object error in models.py

I am writing my first Django project and using Django 1.7, and for my login and authentication I am using the Django User model. I am now creating my models. Project and User share a Many-to-Many relationship models.py: from django.db import…
waterAddict
  • 1
  • 1
  • 2
0
votes
2 answers

Django AbstractUsers create_user not working properly

I have my models defined as: class MyUser(AbstractUser): created = models.DateTimeField(auto_now_add=True) name = models.CharField(max_length=256) phone = models.IntegerField() USERNAME_FIELD = 'email' REQUIRED_FIELDS =…
saurabh
  • 293
  • 2
  • 7
  • 19
0
votes
1 answer

how can I change an OneToOne field in django Custom User?

I have a OneToOne relationship in my CustomUser model. my model is: class Channel(models.Model): channel_name = models.CharField(max_length=60, primary_key=True) channel_host = models.CharField(max_length=60) channel_secret =…
nim4n
  • 1,813
  • 3
  • 21
  • 36
0
votes
3 answers

Django - all attributes for the User object?

I am reading a book called 'Packt Publishing, Learning Website Development with Django' and I am doing a tutorial on how to create a bookmarking website where users can read articles and bookmark them / save the url to the article. Here is the…
SilentDev
  • 20,997
  • 28
  • 111
  • 214
0
votes
0 answers

Django admin error,Not able to import user

I have a models.py which looks like this : from django.db import models from django.contrib.auth.models import User class Change(models.Model): RFC = models.CharField(max_length=10) Ticket_Number = models.CharField(max_length=10) Plan_Owner =…
Amistad
  • 7,100
  • 13
  • 48
  • 75
0
votes
1 answer

Substituting the User model in django with more than one user auth model

I am creating an application where it will have two types of users Teacher and Student. Both of them will be able to connect to my portal, but they have different permissions. They also have different fields (the teacher has fields about name, field…
Apostolos
  • 7,763
  • 17
  • 80
  • 150
0
votes
1 answer

Django Admin. New user. Custom permissions

I need to create custom template for 'new user' page in django admin (which is /admin/auth/user/add/ by default). I only want to add some checkboxes, which represent custom permissions for user. For example, if admin selects some of them during…
int
  • 224
  • 1
  • 3
  • 10
0
votes
1 answer

Django-allauth Custom User Configuration Form trouble

I am trying to configure a custom user using django-allauth and have created the following signup form in a new app customforms #settings.py ACCOUNT_SIGNUP_FORM_CLASS = 'custom_forms.SignupForm' #custom_forms/models.py from django import…
user1532761
  • 29
  • 1
  • 7
0
votes
1 answer

What is the best way to implement Django Users?

I'm pretty new to django and I'm a little confused as to what is the best and common practice for implementing users in Django apps. Do people use the django's built-in user system in each app, create an app using django's built-in users and…
aled1027
  • 1,326
  • 2
  • 13
  • 17
0
votes
1 answer

Can Django user model inheritance and abstract class be used in combination?

Im just getting in to both Python and Django, so pardon my ignorance. In building out my models I've decided to go with user extension rather than replacement. Just seems simpler and I'm still new. What I've found is that an abstract will work…
meteorainer
  • 913
  • 8
  • 21
0
votes
1 answer

Django - Updating UserProfile Always Returning Not_Valid()

I am currently working on a Django project. This is my first introduction to Python / Django, so I'm currently learning the ropes. Hope you all can help! I'm currently trying to update some custom fields I have setup in my UserProfile model via the…
0
votes
1 answer

Save model with OneToOne field

I have created a profile-model to extend the default django user (using django 1.6) But I can't save the profile-model correctly. Here is my model: from django.contrib.auth.models import User class Profile(models.Model): user =…
Tomas Jacobsen
  • 2,368
  • 6
  • 37
  • 81
0
votes
1 answer

'ProfileManager' object has no attribute 'username'

I'm trying to make a custom user model with username an email fields both unique and required, and I'm doing this by te example from https://docs.djangoproject.com/en/dev/topics/auth/customizing/#a-full-example Here's my models.py: from django.db…
0
votes
2 answers

Convert Django ModelForm to use User object

I'm creating a registration form for my site. I'm going with just the standard field entries of username, email, password in my User object. The database tables are already created. Models.py class RegistrationForm(ModelForm): class Meta: …
CodeTalk
  • 3,571
  • 16
  • 57
  • 92
0
votes
1 answer

Django Forms, fields and models

I have a problem and I haven't been capable for finding the solution. I've got the next class #models.py from django import models class Suggest(models.Model): user = models.ForeignKey(User, null= True, blank=True) article =…
Jorge
  • 333
  • 1
  • 5
  • 17