weird import problem

1 view
Skip to first unread message

mail....@gmail.com

unread,
Nov 17, 2006, 2:12:38 PM11/17/06
to Django users
I'm attempting to install the nesh.thumbnails app for images with
thumbnails.

In my model, I put
from nesh.thumbnail import ImageWithThumbnailField

but that fails unless I drill down a layer deeper and put
from nesh.thumbnail.field import ImageWithThumbnailField

which then fails when it tries to import something else. So what's up?
Should I install thumbnail, utils and who knows what else as
applications in my project or is it just something awry in my python
path or something?

mail....@gmail.com

unread,
Nov 20, 2006, 10:32:31 AM11/20/06
to Django users
Never mind. I'm an idiot, and forgot to add it to installed_apps.

mail....@gmail.com

unread,
Nov 20, 2006, 11:08:41 AM11/20/06
to Django users
Nope. that wasn't it. Still can't get this thing to import properly.
Anyone?

mtbe...@gmail.com

unread,
Nov 20, 2006, 2:27:45 PM11/20/06
to Django users
What is it that it fails to import if you use the second one?

Also, the reason the first one doesnt work is because that class exists
within the field.py. So if you try to import it from a place it doesnt
exist, it doesnt work.

You might also try

from nesh.thumbnail import field

to get everything in that file imported.

mail....@gmail.com

unread,
Nov 20, 2006, 3:18:58 PM11/20/06
to Django users
Well, I've figured out the page I was working from has been replaced by
a newer version, which does seem to explain some things. Following it,
I deleted my old nesh folder and reinstalled from SVN.
The instructions say to install, add to installed_apps, then run syncdb
to install tables. When I run syncdb, nothing is created.

Waylan Limberg

unread,
Nov 20, 2006, 3:34:01 PM11/20/06
to django...@googlegroups.com

Did you delete your old tables from the db first? You need to do that
manually. If you don't have any important data in there, it's probably
easiest to just delete the whole db and start over. One run of syncdb
will rebuild the whole thing.

>
>
> >
>


--
----
Waylan Limberg
way...@gmail.com

mail....@gmail.com

unread,
Nov 20, 2006, 3:41:01 PM11/20/06
to Django users
That's the thing.. there ARE no tables in the DB. They never were
created, this time, or previously. Nothing related to thumbnails at
all.

Syncdb only seems to have any effect on the gretschpages project, not
the nesh project

mail....@gmail.com

unread,
Nov 20, 2006, 5:03:09 PM11/20/06
to Django users
Because I'm using python 2.4 and dreamhost was markedly NOT helpful, I
had to install the PIL myself. I wonder if that's the problem?

Eugene Lazutkin

unread,
Nov 20, 2006, 6:06:39 PM11/20/06
to django...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bax...@gretschpages.com wrote:
> Because I'm using python 2.4 and dreamhost was markedly NOT helpful, I
> had to install the PIL myself. I wonder if that's the problem?

I use the Ian Bicking's "virtual python" on Dreamhost
(http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python).
I installed PIL myself to generate thumbnails. So far it works great. It
should not be a problem unless you installed it incorrectly.

Thanks,

Eugene

PS: IIRC, Dreamhost has PIL pre-installed. In fact it is the only
package they have installed on the vanilla Python installation.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYjT/NBGe1BFjGFcRAqC3AJ4wKKaMvTcfy692MQIVWuBMtqGJ0wCdHOQI
7u14ew0KGUDyv9XfXQaEeWI=
=NOM1
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages