-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error: One or more models did not validate: #1
Comments
As far as I understand this, it is a problem with the way the Address If you're going to use the area_tax's model address, then removing |
Hmm, I removed shop.addressmodel form INSTALLED_APPS, but still running into the same error. |
At the very least, you shouldn't be getting the 'addressmodel.address' |
Or maybe you could describe a minimal way of reproducing this error? like, create a new virtualenv, install django, and django-shop, have this and this apps installed in, and syncdb.. bam! |
I just thought of something, but since I cannot reproduce your bug, I don't know if it'd work. Can you try setting up |
There literally is no other addressmodel defined. As a starting point, I removed l10n from installed apps, and get this: INSTALLED_APPS = ( area_tax.areatax: 'country' has a relation with model <class 'l10n.models.Country'>, which has either not been installed or is abstract. Okay, great, let's add l10n back in... l10n.address: Accessor for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'. INSTALLED_APPS = ( |
so... what? what happened when you added l10n back? I see no errors there. I've noticed a couple of things that are a problem, first of all, that putting the Address model in models.py will bring trouble if you want to define your own address model. The Address model was always defined in
and then in your |
That seems to have worked. Still can't run migrations or spin up dev server though. Error: One or more models did not validate: |
Fresh django-shop install and getting this issue (which I noticed you were trying to sort out on SO).
Error: One or more models did not validate:
addressmodel.address: Accessor for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
addressmodel.address: Reverse query name for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
addressmodel.address: Accessor for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
addressmodel.address: Reverse query name for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
l10n.address: Accessor for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
l10n.address: Reverse query name for field 'user_shipping' clashes with related field 'User.shipping_address'. Add a related_name argument to the definition for 'user_shipping'.
l10n.address: Accessor for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
l10n.address: Reverse query name for field 'user_billing' clashes with related field 'User.billing_address'. Add a related_name argument to the definition for 'user_billing'.
The text was updated successfully, but these errors were encountered: