On Sun, Feb 15, 2009 at 9:46 AM, pault <paul...@gmail.com> wrote:

>
> Malcom many thanks for your reply I created a new project and app to
> with only one model and one test.
> It still fails I know I am missing something but I cant figure out
> what that is.
>
> I tested this on both mac OSx10.5 and vista (both python 2.5.1 and
> django version 1.02)
>
> Here are my models.py and my tests.py
> http://dpaste.com/120843/
>
> The only other thing I changed is add myproj.myapp to my
> INSTALLED_APPS
>

Specify just myapp, not myproj.myapp, in INSTALLED_APPS.

Alternatively the error can be fixed by changing:

from myapp.models import Company,CustomError

to:

from myproj.myapp.models import Company,CustomError

in your tests.py, but that isn't what I would do.  The fact that it works to
fix the error just points towards the fact that you need to be consistent in
whether it's myproj.myapp.models or just myapp.models you are using.  I
think it's generally easier (and more re-usable when you want to move things
from project to project) to consistently omit the project part in the
imports, so I'd go with the first option.

Karen

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

Reply via email to