Yeah, for things like forms.py and views.py, it's best to use relative 
imports for the models.py within the same app.

from .models import Object1


On Wednesday, February 6, 2013 7:22:19 PM UTC-7, frocco wrote:
>
> I found the answer.
> in my app directory called checkout, I also have a checkout.py file.
> from checkout.models import Order in views.py had to be changed to from 
> models import Order
>
> On Wednesday, February 6, 2013 3:02:57 PM UTC-5, Brad Pitcher wrote:
>>
>> On Wed, 2013-02-06 at 11:49 -0800, frocco wrote: 
>> > Line 22 does not make any sense to me as to why it is failing. 
>> > If I remove receipt, it runs fine 
>>
>> It can be surprising sometimes what code can cause other code to get 
>> imported and run. My guess is, in trying to find your url route there, 
>> Django looks through ntw.urls. When it sees 'receipts' it imports 
>> ntw.checkout.views to see if that view is there. Suffice it to say, 
>> Django is trying to run the code in ntw\checkout\views.py and it would 
>> be a good idea to make it work. 
>>
>>

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


Reply via email to