manage.py runserver throws an ImportError with my appname, MacPorts issue on OSX?
- by christmasgorilla
I've been developing a Django app for weeks locally on OSX 10.6.3. Recently, I rebooted my machine and went to start my development environment up.
Here's the error:
cm:myApp cm$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 11, in execute_manager(settings)
File "/Library/Python/2.6/site-packages/django/core/management/init.py", line 360, in execute_manager
setup_environ(settings_mod)
File "/Library/Python/2.6/site-packages/django/core/management/init.py", line 343, in setup_environ
project_module = import_module(project_name)
File "/Library/Python/2.6/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
ImportError: No module named myapp
I'm pretty new to Django / Python.
Digging around, it's possible that this might be due to MacPorts. Initially, I had a rough time getting Django up and running and I no longer remember if I'm using the Django from a MacPorts install or from easy_install. How do I tell? (I'd prefer not to reinstall everything).
Also, why is the camel casing in my app name gone in the ImportError message? When I search for "myapp" in my django project, I don't find it without camelcase anywhere.
And what causes MacPorts to work for a while but then break?
As a few other details, from settings.py:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'south',
'registration',
'pypaypal',
'notifier',
'myApp.batches',
)