Hi All -
Here's the relevant code in UserProfile model
class UserProfile(models.Model):
user = models.OneToOneField('auth.User', blank=True, null=True,
related_name='userprofile')
owner = models.ForeignKey('auth.User', blank=True, null=True,
related_name='subordinates')
When I makemigrations I get the following error:
'dashboard.UserProfile' has more than one ForeignKey to 'auth.User'.
The issue seems to be stemming from the mezzanine.accounts.admin profile
inlines:
If I add :
fk_name = 'user'
to the body of the ProfileLineClass the issue is fixed.
try:
class ProfileInline(admin.StackedInline):
model = get_profile_model()
can_delete = False
template = "admin/profile_inline.html"
extra = 0
UserProfileAdmin.inlines += (ProfileInline,)
except ProfileNotConfigured:
pass
However, I am having a tough time sub classing ProfileInline. I can't seem
to get it to work from my project.
Any suggestions on the sub classing approach would be greatly appreciated.
Also, if this is an issue that should be posted in github please let me
know. Not sure if this is a bug.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.