Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Django store auth's superuser / pw / e-mail data?

After running syncdb and creating a su, where does that get recorded? Settings.py doesn't seem to change.

like image 441
fooba Avatar asked May 15 '10 21:05

fooba


People also ask

What is user authentication and authorization in Django?

Django provides an authentication and authorization ("permission") system, built on top of the session framework discussed in the previous tutorial, that allows you to verify user credentials and define what actions each user is allowed to perform.

What are the emailfield options and attributes in Django?

Here are the field options and attributes that a EmailField can use. If True, Django will store empty values as NULL in the database. Default is False. If True, the field is allowed to be blank. Default is False. The name of the database column to use for this field. If this isn’t given, Django will use the field’s name.

How do I view my existing users in Django?

Login to the site using the credentials for your superuser account. The top level of the Admin site displays all of your models, sorted by "Django application". From the Authentication and Authorisation section, you can click the Users or Groups links to see their existing records.

What is is_superuser in Django?

is_superuser is a flag on the User model, as you can see in the documentation here: from django.contrib.auth.models import User superusers = User.objects.filter (is_superuser=True) This is good, but how would you get the currently logged in superuser's details?


Video Answer


1 Answers

It gets recorded as an instance of django.contrib.auth.models.User.

like image 53
Ignacio Vazquez-Abrams Avatar answered Oct 12 '22 05:10

Ignacio Vazquez-Abrams