After running syncdb and creating a su, where does that get recorded? Settings.py doesn't seem to change.
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.
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.
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.
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?
It gets recorded as an instance of django.contrib.auth.models.User
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With