python - Where do I create custom profile models for django-userena? -
i have django app called my_app
uses django-userena
; trying create , use own profile model following django-userena installation documentation.
in my_app/models.py
i've added
from django.contrib.auth.models import user django.utils.translation import ugettext _ userena.models import userenabaseprofile class myprofile(userenabaseprofile): user = models.onetoonefield(user, unique=true, verbose_name=_('user'), related_name='my_profile') favourite_snack = models.charfield(_('favourite snack'), max_length=5)
and i've modified my_app/settings.py
include auth_profile_module = 'my_app.myprofile'
.
and yet, when try view web page my_app siteprofilenotavailable
. error goes away if move myprofile
accounts/models.py
it seems bad idea modify accounts
app in order add custom fields. wrong? there way add custom profile module without modifying accounts/models.py
?
Comments
Post a Comment