OK - removed all the custom middleware and revealed an earlier
problem:

]     __import__(name), referer: http://phb.tinycomms.com/
]   File "/home/django/tinycomms/libs/tinycomm.py", line 13, in
<module>, re
]     from tinycomms.tinycomm.models import *, referer: http://phb.tinycomms
]   File "/home/django/tinycomms/tinycomm/models.py", line 14, in
<module>,
]     from tinycomm.fields import *, referer: http://phb.tinycomms.com/
] ImportError: No module named fields, referer: http://phb.tinycomms.com/


Here is the code in libs/tincyomm.py, error was a recent one in
development environment

#PHB don't ask me why I have to put the project here
#after over a day getting
#Could not import web.views. Error was: No module named models
#I don't care why, I just want it working
from tinycomms.tinycomm.models import *


And the code in tinycomm/models.py
from tinycomm.fields import *


I tried removing the project from the first bit of code:
from tinycomm.models import *
which had been fine until recently, and I got the No module named
models error again

If I put the project back and add project in models.py then I get

    __import__(name), referer: http://phb.tinycomms.com/
  File "/home/django/tinycomms/avatar/__init__.py", line 19, in
<module>, refe
    from avatar.models import Avatar, referer: http://phb.tinycomms.com/
  File "/home/django/tinycomms/avatar/models.py", line 25, in
<module>, refere
    class Avatar(models.Model):, referer: http://phb.tinycomms.com/
  File "/home/django/tinycomms/avatar/models.py", line 26, in Avatar,
referer:
    from tinycomm.models import Who, referer: http://phb.tinycomms.com/
ImportError: No module named models, referer: http://phb.tinycomms.com/



SO if you use the full path to a module once are you supposed to use
it everywhere?  If so, why was it working in development?
Am running python 2.5.2 on both the production and development box.

Now totally confused....

Phoebe.

On Feb 2, 12:12 pm, Gonzalo Delgado <[email protected]> wrote:
> El 02/02/10 08:33, phoebebright escribi :
>
> > But fields is not mentioned in the middleware:
>
> > from libs.utils import  changehat
> > class CheckScopeMiddleware:
> >     """
> >     if there is a hat in the GET then swithc to that hat (if
> > different)
> >     """
> >     def process_request(self, request):
>
> >           if 'hat' in request.GET:
> >                if request.GET['hat'] != request.session['hat']:
> >                    hatcontext = changehat(request, request.GET['hat'])
>
> How about in the "changehat" module, is "fields" not mentioned there
> either (or in a module it imports, and so on)?
>
> --
> Gonzalo Delgado <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to