Re: Error while importing URLconf 'mysite.urls': 'module' object has no attribute 'views'
Resolved. Don't know how. On Jun 14, 9:16 pm, Chris Haynes <[EMAIL PROTECTED]> wrote: > This error goes away if I remove the line > (r'^ptree/$', mysite.trees.views.parse_tree), > from the urlpatterns. But I can import trees.views from the shell > > ~/dj/mysite 144: manage.py shell > Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. > (InteractiveConsole)>>> import trees.views > >>> import urls > > Traceback (most recent call last): > File "", line 1, in > File "c:\Users\Chris\dj\mysite\urls.py", line 17, in > (r'^ptree/$', mysite.trees.views.parse_tree), > AttributeError: 'module' object has no attribute 'views' > > >>> # comment out line 17 in urls.py > >>> import urls > > Using django 0.97 pre. There's another app in the site created some > time ago that works, but I've just created mysite.trees. Both are > imported in the INSTALLED_APPS list. > The only significant difference I note is the lack of a database model > in mysite trees, but don't see what that would have to do with this > error. Any help appreciated! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Error while importing URLconf 'mysite.urls': 'module' object has no attribute 'views'
This error goes away if I remove the line (r'^ptree/$', mysite.trees.views.parse_tree), from the urlpatterns. But I can import trees.views from the shell ~/dj/mysite 144: manage.py shell Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> import trees.views >>> import urls Traceback (most recent call last): File "", line 1, in File "c:\Users\Chris\dj\mysite\urls.py", line 17, in (r'^ptree/$', mysite.trees.views.parse_tree), AttributeError: 'module' object has no attribute 'views' >>> # comment out line 17 in urls.py >>> import urls >>> Using django 0.97 pre. There's another app in the site created some time ago that works, but I've just created mysite.trees. Both are imported in the INSTALLED_APPS list. The only significant difference I note is the lack of a database model in mysite trees, but don't see what that would have to do with this error. Any help appreciated! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---