Задать вопрос

Тел: +7 965 3737 888

499

Просмотров

0

Ответов

convenience parent class for UserProfile model

<p>This is just a reusable convenience parent class to allow you to create and administer an automatic user profile class using the following code:</p>
class UserProfile(UserProfileModel):
    likes_kittens = models.BooleanField(default=True)

<p>Whenever a User object is created, a corresponding UserProfile will also be created. That's it.</p>
<p>NB: You will still need to set AUTH_PROFILE_MODULE in your settings :-)</p>
<p>(PS: It would also be nice to have the resulting class proxy the User object's attributes like django's model inheritance does, while still automatically creating a UserProfile object when a User object is created :-)</p>

Вопрос полезен? Да0/Нет0
file_4032.py(826.0б)
None