Challenge: AuthMixin
Tehtävä
Swipe to start coding
Let's make your code more flexible.
- Define the
AuthMixinclass. - Cut the
loginandlogoutmethods from theUserclass and insert them into theAuthMixinbody. - Move the
is_authenticatedclass attribute to theAuthMixin. - Inherit the
Userclass from theAuthMixin.
Note
After performing all the actions, you will have an authorization mixin (
AuthMixin) that can be used for different user classes.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 4. Luku 3
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 2.78
Challenge: AuthMixin
Pyyhkäise näyttääksesi valikon
Tehtävä
Swipe to start coding
Let's make your code more flexible.
- Define the
AuthMixinclass. - Cut the
loginandlogoutmethods from theUserclass and insert them into theAuthMixinbody. - Move the
is_authenticatedclass attribute to theAuthMixin. - Inherit the
Userclass from theAuthMixin.
Note
After performing all the actions, you will have an authorization mixin (
AuthMixin) that can be used for different user classes.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 4. Luku 3
single