List Info

Thread: name 'django' is not defined




name 'django' is not defined
country flaguser name
Germany
2007-11-07 08:41:14
Hello,
I'm using Django trunk.

After some weeks of paused development I started my app
again today. But as 
soon as I access the URL defined at the root urls.py:

(r"^blog/", include("xgm.Blog.urls")),

I get an error:

Error while importing URLconf 'xgm.Blog.urls': name 'django'
is not defined

The first line of xgm.Blog.urls is:

from django.conf.urls.defaults import *

The app is started with the manage.py script.

Anyone got an idea whats is wrong here?

Thanks,

Florian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: name 'django' is not defined
user name
2007-11-07 09:23:29
Am Mittwoch, 7. November 2007 15:41 schrieb Florian
Lindner:
> Hello,
> I'm using Django trunk.
>
> After some weeks of paused development I started my app
again today. But as
> soon as I access the URL defined at the root urls.py:
>
> (r"^blog/",
include("xgm.Blog.urls")),
>
> I get an error:
>
> Error while importing URLconf 'xgm.Blog.urls': name
'django' is not defined
>
> The first line of xgm.Blog.urls is:
>
> from django.conf.urls.defaults import *
>
> The app is started with the manage.py script.
>
> Anyone got an idea whats is wrong here?

The Python interpreter can't find the module 'django'.

At runtime the path is stored in sys.path.

You can debug this:
import sys
assert False, sys.path

You have several options:
 1. modify the environment variable PYTHONPATH
 2. modify sys.path:
   sys.path.append('/yourpath')
 3. Move the django directory (the one that contains e.g.
'newforms')
    to a place on your sys.path.

 Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )