Thanks Karen, it now works as expected ! . In the tutorial http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01 they use the proj in imports but I think the your first option is better as it is more pluggable in other projects that way. I wonder if there are any pros to do it like that as your option looks "better practice"?
Thanks again for your help. regards Paul On Feb 15, 4:18 pm, Karen Tracey <kmtra...@gmail.com> wrote: > 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 -~----------~----~----~----~------~----~------~--~---