Thursday, November 24, 2011

Re: Named URLs Error

On Thu, Nov 24, 2011 at 3:43 PM, eeyore <maxtierro@gmail.com> wrote:
> Tom,
>
> 1) The 'product' directory is not a module itself - it has no
> __init__.py
>
> The 'product' directory has __init.__.py
>
> 2) You have two modules called 'product', and it is attempting to
> import urls from the 'wrong one'.
>
> I created a new app with only one module to test it.
>
> "from product.urls import urlpatterns"
>
> Returns no errors.
>

Confused, how does creating a new app and importing urls.py from that
test the validity of the urls.py in your current app?

I got the name of your app wrong in my initial mail, I see it is
actually 'products'. Without starting a new app(!), can you import
from 'products.urls' successfully?

The traceback clearly indicates that it cannot import a url conf
because of import errors. You need to track down what that error is.
If you still can't, paste the entire traceback so that we have more
information to go on.

Cheers

Tom

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment