Challenge: AuthMixin
Завдання
Swipe to start coding
Let's make your code more flexible.
- Define the
AuthMixin
class. - Cut the
login
andlogout
methods from theUser
class and insert them into theAuthMixin
body. - Move the
is_authenticated
class attribute to theAuthMixin
. - Inherit the
User
class from theAuthMixin
.
Note
After performing all the actions, you will have an authorization mixin (
AuthMixin
) that can be used for different user classes.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 3
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 2.78
Challenge: AuthMixin
Свайпніть щоб показати меню
Завдання
Swipe to start coding
Let's make your code more flexible.
- Define the
AuthMixin
class. - Cut the
login
andlogout
methods from theUser
class and insert them into theAuthMixin
body. - Move the
is_authenticated
class attribute to theAuthMixin
. - Inherit the
User
class from theAuthMixin
.
Note
After performing all the actions, you will have an authorization mixin (
AuthMixin
) that can be used for different user classes.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Awesome!
Completion rate improved to 2.78Секція 4. Розділ 3
single