On Thu, Nov 29, 2012 at 4:51 AM, Chris Recher
<perfectlygenericaddress@gmail.com> wrote:
> Hi all,
>
> I'm working through the Django book and I've run into an error that wasn't
> predicted. I've got a project called mysite. I used "python manage.py
> startapp books" to create an app called books inside of it. I added a few
> models to the models.py file inside books, then tried to use "python
> manage.py validate". I got "Error: No module named books" in return.
> __init__.py is perfectly intact in both the second mysite directory and the
> books directory. I've added mysite.books to INSTALLED_APPS. All the results
> I could find searching for this problem deal with someone that's made a
> spelling mistake somewhere. I've been through my files multiple times, and
> my spelling is pristine. I figure I'm making an obvious, beginner's mistake
> - could anyone help?
>
Hi Chris
First hint, newlines are free to use! Consider some next time!
Second, Django is an evolving framework. It helps to know what version
you are using.
Finally, launch the django shell ("python mange.py shell" instead of
"python manage.py runserver").
Try to import your module - "import mysite.books" - does it work?
If it doesn't, does this work? - "import books"
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment