Wednesday, March 27, 2013

Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

Hello there,

I am working through the django tutorial at djangoproject.com. So far everything works out fine until Section 2.4.6 (customizing the admin form). Django throws an error:  'module' has no attribute 'StackedInLine'. I checked around and this seems to work:
if you use import to include a module, make sure you don't have a file named just the same as the module you are trying to include in current directory. It seems python takes preference for local files over modules thus import fails.
Problem is, how now do I call the Poll admin module if it's name has been changed to say admin2.py since naming it admin.py conflicts with the main django admin.
I hope this makes sense!
Thanks.

--
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+unsubscribe@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.
 
 

No comments:

Post a Comment