Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

models did not validate #2

Open
antoniofcano opened this issue Jan 8, 2011 · 1 comment
Open

models did not validate #2

antoniofcano opened this issue Jan 8, 2011 · 1 comment

Comments

@antoniofcano
Copy link

I've installed idios following the instructions. When finished I run the command manage.py 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 settings.py is this too:
INSTALLED_APPS = [
#"pinax.apps.profiles",
"idios",

ABSOLUTE_URL_OVERRIDES = {
"auth.user": lambda o: "/profiles/profile/%s/" % o.username,
}

AUTH_PROFILE_MODULE = "asprofile.Profile"

Best wishes

@antoniofcano
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant