Chris Haynes
unread,Jun 14, 2008, 9:16:26 PM6/14/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
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 "<console>", line 1, in <module>
File "c:\Users\Chris\dj\mysite\urls.py", line 17, in <module>
(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!