models did not validate #2

antoniofcano opened this Issue Jan 8, 2011 · 1 comment

1 participant


I've installed idios following the instructions. When finished I run the command syncdb and returns with this error:

asprofile.profile: Accessor for field 'user' clashes with related field 'User.profile_set'. Add a related_name argument to the definition for 'user'.

My model class is this:
class Profile(ProfileBase):
maquinaria = models.CharField(("maquinaria"), max_length=50, null=True, blank=True)
intereses = models.TextField(
("intereses"), null=True, blank=True)

My is this too:

"auth.user": lambda o: "/profiles/profile/%s/" % o.username,

AUTH_PROFILE_MODULE = "asprofile.Profile"

Best wishes


Seems that this can be solved with this little change into idios.models.Profile

user = models.ForeignKey(User, verbose_name=_("user"), related_name="%(app_label)s_%(class)s_related")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment