Does your project root (I'm assuming that's the directory containing
the sub directory "app") have an __init__.py file. Does the app
directory? I'm assuming that the one you mention below is in
app/models/ . All three are required, if what you have on your
sys.path is just the project root.
Do make sure that your project root is on your sys.path. You can do
that by temporarily adding:
import foo
to settings.py, and creating a file foo.py in the project root containing, say:
print "Foo!"
and then do:
python manage.py shell
As part of the startup printout you should get a line containing only:
Foo!
By the way, I'm pretty sure that lots of django internal machinery,
like syncdb, for example, depends on there being a file named exactly
"models.py" in each app. So a better choice of directory structure
might be "app/myapp/models.py", with your myclass class in the
models.py file. Pinax uses such a structure, though the upper
directory is called apps instead of app (there may be more than one)
and has been added to the path, so that you can mention it in
INSTALLED_APPS as just 'myapp', rather than 'apps/myapp'. If you go
this route, you will want to insert the apps directory at or near the
beginning of sys.path, rather than appending it, so that when you
mention a possibly installed app, such as django_microblogging, but
which you have customized in a copy in your apps folder, you can say
'microblogging' in your INSTALLED_APPS and it will find yours rather
than the system version. (TN.B.: emplate paths are a separate issue.)
Bill