django-users Questions

3

Solved

How do you get your template/view to recognize whether or not a logged in user is a super user or not? There are certain buttons on my forms (in the template) that I want completely hidden if the...
Earnestineearnings asked 8/4, 2012 at 19:20

6

I needed to add more fields to Django's User model, so I created a custom model class (named Accounts in an app named accounts) that extends Django's AbstractUser class. After that, I updated my s...
Outwards asked 24/10, 2016 at 15:35

5

Solved

I have a django site with a large customer base. I would like to give our customer service department the ability to alter normal user accounts, doing things like changing passwords, email addresse...
Clower asked 19/2, 2010 at 15:23

1

I am using Django Rest Framework with React on the Frontend. I am using Token Athentication and its all working fine. I now have a requirement of making sure different users can access different th...
Celestina asked 1/2, 2019 at 12:44

3

Solved

I'm trying to figure out a way on how to exclude the username and/or password from the UserChangeForm. I tried both exclude and fields but I doesn't work for these two fields. Here's some code: c...
Asturias asked 2/5, 2013 at 11:49

2

Solved

I am working on extending the User class based on the docs with the code below: from django.contrib.auth.models import AbstractUser class MyUser(AbstractUser): some_extra_data = models.CharField...
Rockyrococo asked 2/11, 2014 at 19:21

3

Solved

python manage.py shell >>> from django.contrib.auth.models import User >>> u=User.objects.get_or_create(username="testuser2",password="123") >>> u (<User: testuser2&g...
Clayclaybank asked 7/4, 2014 at 22:15

1

Solved

So, I'm fairly new to Django. Notwithstanding the fact that my code works after following the Django docs 'Customizing authentication in Django', I don't get how the self.model(...) in their exampl...

1

I've an application where I need to change username field to Autofield. Use-case - I'am building an application where when the users will be created, usernames should be like CustomerID(integers)...
Manis asked 26/6, 2018 at 11:51

3

Solved

I want to automate creation of Django users via a Bash script. I found this snippet which almost suits my needs: echo "from django.contrib.auth.models import User; User.objects.create_superuser('...
Olney asked 28/9, 2016 at 10:16

1

Solved

how can I set default group for new users that I create? I didn't create custom model of user and My django version is 1.11.
Beulabeulah asked 31/1, 2018 at 14:10

3

Solved

My custom user model for login via email: class MyUser(AbstractBaseUser): id = models.AutoField(primary_key=True) # AutoField? is_superuser = models.IntegerField(default=False) username = model...
Vasyuta asked 12/7, 2015 at 17:5

1

Solved

I have a custom user model and I am using django-rest-framework to create API models.py: class User(AbstractBaseUser, PermissionsMixin): email = models.EmailField( unique=True, max_length=254,...
Flessel asked 26/3, 2017 at 16:21

2

Solved

I want a foreign key relation in my model with the username field in the User table(that stores the user created with django.contrib.auth.forms.UserCreationForm). This how my model looks: class B...
Parachute asked 19/1, 2016 at 11:5

3

Solved

My site is a digital marketplace website written in Django. Digital content(text, images, videos) on the site is 'locked' by default. Only users who bought those content can view it. There's a st...

2

Solved

Is there any possibility to create custom action in admin page for django UserModel? I want automatize adding user to group (like adding him to staff, set some extra values, etc.), and of course cr...
Liponis asked 6/9, 2010 at 14:39

4

Solved

I have many Models linked to User and I'd like my templates to always display his full_name if available. Is there a way to change the default User __unicode__() ? Or is there another way to do it ...
Peeved asked 10/8, 2012 at 13:4

1

Solved

My project name is timecapture Here is relevant portion of timecapture/settings.py INSTALLED_APPS = [ # 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django....
Abstergent asked 6/3, 2016 at 18:32

4

Im trying to migrate my django model: from django.contrib.auth.models import User class Post(models.Model): headline = models.CharField(max_length=200) slug = models.SlugField(max_length=200) ...
Rattletrap asked 3/9, 2013 at 21:5

2

Solved

How to remove the password in the users table and User class in a custom user model? I'm using django-rest-framework token authentication, so i don't need the password field. Here is my model: c...
Oireachtas asked 21/1, 2016 at 11:23

4

Solved

A great greetings community My question is related with the kind of manage users and the schema users in Django, In beginning I ask to you apologize just in case that my questions can will be too ...
Frit asked 10/12, 2015 at 22:42

3

Solved

Please note--this is an updated version of my original question on this subject, but deserves to be asked again with the change in how Django deals with users and authentication. I'm working on a ...
Vaasta asked 26/12, 2013 at 4:20

4

Solved

My custom user model: class MyUser(AbstractBaseUser): username = models.CharField(unique=True,max_length=30) email = models.EmailField(unique=True,max_length=75) is_staff = models.IntegerField(...
Baumgardner asked 12/7, 2015 at 16:39

3

I want to increase the length of the username in django from 30 to around 80, I know it may be duplicate question but the previous answers are not working, for example https://kfalck.net/2010/12/30...
Ferraro asked 16/10, 2014 at 8:40

1

I have this model: class MyModel(User): #others fields and this serializer: class MySerializer(serializers.ModelSerializer): class Meta: model = MyModel fields = ('username', 'password', 's...
Heavenly asked 24/7, 2014 at 19:30

© 2022 - 2024 — McMap. All rights reserved.