> so it's odd that my new project works with "python manage.py
> runserver" but gives me an error when i do "django-admin.py
> runserver." how is this possible?

Is it?
Have a look inside manage.py:
"
try:
    import settings # Assumed to be in the same directory.
except ImportError:
    import sys
"
It imports your settings file; django-admin.py does no such thing.
Hence manage.py takes care of setting up your environment correctly
for the current project such as your PYTHONPATH, and it can find all
the modules (apps) in your project directory. That explains why you
get an ImportError: the whatever module isn't in your PYTHONPATH.

Hope that clarifies things.

  Evert

> btw the error is below:
>
> Traceback (most recent call last):
>   File "/Library/Frameworks/Python.framework/Versions/Current/bin/
> django-admin.py", line 5, in <module>
>     management.execute_from_command_line()
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/__init__.py", line 263,
> in execute_from_command_line
>     utility.execute()
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/__init__.py", line 219,
> in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 77, in
> run_from_argv
>     self.execute(*args, **options.__dict__)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 86, in
> execute
>     translation.activate('en-us')
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/utils/translation/__init__.py", line
> 73, in activate
>     return real_activate(language)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/utils/translation/__init__.py", line
> 43, in delayed_loader
>     return g['real_%s' % caller](*args, **kwargs)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/utils/translation/trans_real.py", line
> 220, in activate
>     _active[currentThread()] = translation(language)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/utils/translation/trans_real.py", line
> 209, in translation
>     default_translation = _fetch(settings.LANGUAGE_CODE)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/utils/translation/trans_real.py", line
> 192, in _fetch
>     app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]),
> appname[p+1:])
> ImportError: No module named whatever
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to