Re: Module imports in models

2006-03-14 Thread Amit Upadhyay
Hi Clint,This is due to magic that django performs on models. The class you defined lands up in some other module that django created, and module level imports are not passed along. You can solve your problem either by importing within the _pre_save, or define your Meta class as: class Meta:   modu

Re: Module imports in models

2006-03-14 Thread Clint Ecker
I'm using Django 0.91-svn if that mattersOn 3/14/06, Clint Ecker <[EMAIL PROTECTED]> wrote: I'm having an odd problem when trying to import some python modules in my Django models.  Things just aren't working how I'd expect:The broken model is below.  The problem occurs when _post_save is called, i

Module imports in models

2006-03-14 Thread Clint Ecker
I'm having an odd problem when trying to import some python modules in my Django models.  Things just aren't working how I'd expect:The broken model is below.  The problem occurs when _post_save is called, it will error out on the "thumbs_dir = os.path..." line because it says that "os" is not glo