Installation issue at satchmo_copy_urls

2 views
Skip to first unread message

Simon Greenwood

unread,
May 18, 2008, 12:49:44 PM5/18/08
to Satchmo users
I'm installing satchmo from the most recent svn and have reached
`python manage.py satchmo_copy_urls` and I'm getting this error:

Error: One or more models did not validate:
product.category: "ordering" refers to "parent__id", a field that
doesn't exist.

It looks like a typo in the application models.py as this is the only
place where parent__id is referenced:

class Admin:
list_display = ('name', '_parents_repr')
ordering = ['parent__id', 'ordering', 'name']

class Meta:
ordering = ['parent__id', 'ordering', 'name']
verbose_name = _("Category")
verbose_name_plural = _("Categories")

although changing 'parent__id' to parent_id doesn't resolve the error.
Any suggestions?

Thanks
Simon

CarlFK

unread,
May 18, 2008, 3:21:02 PM5/18/08
to Satchmo users
works for me(tm)

I did this:
http://www.satchmoproject.com/trac/wiki/SatchmoDependencies
set DATABASE_ENGINE/NAME, then:
juser@dhcp11:~/src/mystore$ ./manage.py satchmo_copy_urls
Copied /home/juser/src/satchmo/urls.py to /home/juser/src/mystore/
satchmo-urls.py

long shot: sounds related to:
http://code.djangoproject.com/ticket/7101
parent__id means id field of parent, a FK field that points to
something.

No clue if this will help or not.

Carl K

CarlFK

unread,
May 18, 2008, 3:55:16 PM5/18/08
to Satchmo users
another related but probably won't help...
http://www.satchmoproject.com/trac/ticket/348

but should make you feel good someone read your post, right?



Simon Greenwood

unread,
May 18, 2008, 4:00:53 PM5/18/08
to Satchmo users
Ah, that makes sense, I'm still getting my head around python
notation.

However, the error comes up when using manage.py with most commands
and appears to derive from django/core/management/base.py, so I guess
I had better wander over to django-users.

s/

Chris Moffitt

unread,
May 18, 2008, 4:59:49 PM5/18/08
to satchm...@googlegroups.com
What version of Django are you using? I believe this issue is related to the one to one field changing in the query set refactor merge that happened a couple of weeks ago.

-Chris

Simon Greenwood

unread,
May 18, 2008, 6:03:00 PM5/18/08
to Satchmo users
I'm using the svn co versions of both django and satchmo. Django I
have had on the machine for a couple of months, satchmo was new today.
I updated django after getting the problem, still no joy. It looks to
me that the validation process is expecting a table to exist to check
on a foreign key, but if the tables aren't in the database, they
aren't going to be there...

s/

On May 18, 9:59 pm, "Chris Moffitt" <ch...@moffitts.net> wrote:
> What version of Django are you using? I believe this issue is related to the
> one to one field changing in the query set refactor merge that happened a
> couple of weeks ago.
>
> -Chris
> ut
> On Sun, May 18, 2008 at 3:00 PM, Simon Greenwood <sfgreenw...@gmail.com>

CarlFK

unread,
May 18, 2008, 10:24:55 PM5/18/08
to Satchmo users
I hope you don't mind my 1/2 baked guesses... glad you are getting
real help to - (Thanks Chris)

guess 1: you ran syncdb using the old django, and now your db is
hozed. blow away the db and run syncdb again (doubt this is it, but
it is easy enough to try)

guess 2: you still don't have a 'correct' django, satchmo, settings,
model.py or db. you could spend time trying to find the discrepancy,
or you could blow away everything and start over. i vote for 2 :)

on #2, how are you doing the installs? one advantage to my hack-n-
slash http://www.satchmoproject.com/trac/wiki/SatchmoDependencies is
it isolates the satchmo/django installs from the 'system
stuff' (python site-libs.) if you have run satchmo or django's
setup.py, then you need to make sure you get those installs either
updated or following my advice will create an even bigger mess...
um, so yeah... only follow my advice if you know what you are doing,
and if you knew what you were doing you wouldn't need my advice :)

I am hanging out in #satchmo on irc.freenode. (only one there, and
about to drive home now.) I might be able to help you diagnose what is
going on quicker than here.

Simon Greenwood

unread,
May 19, 2008, 4:44:19 AM5/19/08
to Satchmo users
Thanks for your response Carl, but I'm in the UK and was asleep when
you posted this. I'll try the nuke approach and report back.

s/

mschot

unread,
May 27, 2008, 6:23:37 PM5/27/08
to Satchmo users
Just letting you all know that updating django sorted it for me.

Jude

unread,
Jun 3, 2008, 12:27:21 PM6/3/08
to Satchmo users
I'm upgrading to the latest Django and Satchmo and have come across
this same problem:

"django.core.management.base.CommandError: One or more models did not
validate:
product.category: "ordering" refers to "parent__id", a field that
doesn't exist."

Did anyone figure out the cause/solution?

Bruce Kroeze

unread,
Jun 3, 2008, 12:34:24 PM6/3/08
to satchm...@googlegroups.com
Update your django, you are probably pre-queryset-refactor.
--
Bruce Kroeze
http://solidsitesolutions.com
Dynamic Designs, Optimized

Jude

unread,
Jun 3, 2008, 4:48:29 PM6/3/08
to Satchmo users
Ahh, I had downloaded, but not installed Django trunk properly.

Thanks
Reply all
Reply to author
Forward
0 new messages