About the administrator mailbox setting in flask web development?

Why is my interface no different from that of an ordinary user when I create an administrator user? My administrator mailbox is set as follows, that is, my QQ Mail. The last two pictures are the creation interfaces for ordinary users and administrator users.


Mar.01,2021

there is another judgment and setting that needs to be made in models.py.

class User(UserMixin, db.Model):
    -sharp ...
    def __init__(self, **kwargs):
        super(User, self).__init__(**kwargs)
        if self.role is None:
            if self.email == current_app.config['FLASKY_ADMIN']:
                self.role = Role.query.filter_by(permissions=0xff).first()
            if self.role is None:
                self.role = Role.query.filter_by(default=True).first()

this is the original code in the dog book. You can also take a closer look at Chapter 9 of the dog book, "user roles"

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b6f5-2c2ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b6f5-2c2ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?