Re: No Module named URLS

2012-02-07 Thread coded kid
Thank so much! I've figured it out. Have fun :)

On Feb 6, 8:55 pm, Sandro Dutra  wrote:
> If I understand you're writing a template for admin, and this is not
> required 'cause the admin template is called by the contrib
> 'django.contrib.admin', in INSTALLED_APPS (settings file), only if you
> want to customize admin, you can override the admin files, putting
> them o 'yourtemplatesdir/admin/', and I think this is not the case.
>
> The only required steps to see the admin page is:
> 1. Check if 'django.contrib.admin' is uncommented in 'settings.py';
> 2. Uncomment the required lines in file 'urls.py';
> 3. Launch the dev server and acess localhost/admin/.
>
> Only this, nothing more...
>
> Templates.py? Templates can have any extension, this is true, but
> usually we put .html or .htm...
>
> 2012/2/6 akaariai :
>
>
>
>
>
>
>
> > On Feb 6, 5:09 pm, coded kid  wrote:
> >> Hey guys, I’m getting an error when trying to visit my admin page:
> >> TemplateSyntaxError at /admin/
> >> Caught ImportError while rendering: No module named urls
>
> >> In urls.py
> >> from django.conf.urls.defaults import patterns, include, url
> >> from django.contrib import admin
> >> admin.autodiscover()
>
> >> urlpatterns = patterns('',
> >> (r'^admin/',include(admin.site.urls)),
> >> )
>
> >> In Template.py
>
> >>    
> >> {% block branding %}{% endblock %}
> >>   {% if user.is_active and user.is_staff %}
> >>    {% trans 'Welcome,' %}  {% filter
> >> force_escape %}{% firstof user.first_name user.username %}{% endfilter
> >> %}.
> >>  {% block userlinks %} {% url 'django-admindocs-docroot' as docsroot
> >> %}  {% if docsroot %}  {% trans
> >> 'Documentation' %} {% endif %}  {% url 'admin:password_change' as
> >> password_change_url %}  {% if password_change_url %} 37  >> href="{{ password_change_url }}">  {% else %}   40 {% endif %} 41 {% trans 'Change password' %} >> a> /
>
> >> What do you think is the problem! I’ve been fighting with this for the
> >> pas 15hrs yet no success. Kindly help me out!
>
> > I don't spot any immediate reason for your problem. Some more
> > information is needed. A full stacktrace is always really good if you
> > happen to get one. Maybe the problem is in your admin.py. As said, it
> > is hard to say without more information.
>
> >  - Anssi
>
> > --
> > 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+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: No Module named URLS

2012-02-06 Thread Sandro Dutra
If I understand you're writing a template for admin, and this is not
required 'cause the admin template is called by the contrib
'django.contrib.admin', in INSTALLED_APPS (settings file), only if you
want to customize admin, you can override the admin files, putting
them o 'yourtemplatesdir/admin/', and I think this is not the case.

The only required steps to see the admin page is:
1. Check if 'django.contrib.admin' is uncommented in 'settings.py';
2. Uncomment the required lines in file 'urls.py';
3. Launch the dev server and acess localhost/admin/.

Only this, nothing more...

Templates.py? Templates can have any extension, this is true, but
usually we put .html or .htm...

2012/2/6 akaariai :
> On Feb 6, 5:09 pm, coded kid  wrote:
>> Hey guys, I’m getting an error when trying to visit my admin page:
>> TemplateSyntaxError at /admin/
>> Caught ImportError while rendering: No module named urls
>>
>> In urls.py
>> from django.conf.urls.defaults import patterns, include, url
>> from django.contrib import admin
>> admin.autodiscover()
>>
>> urlpatterns = patterns('',
>> (r'^admin/',include(admin.site.urls)),
>> )
>>
>> In Template.py
>>
>>    
>> {% block branding %}{% endblock %}
>>   {% if user.is_active and user.is_staff %}
>>    {% trans 'Welcome,' %}  {% filter
>> force_escape %}{% firstof user.first_name user.username %}{% endfilter
>> %}.
>>  {% block userlinks %} {% url 'django-admindocs-docroot' as docsroot
>> %}  {% if docsroot %}  {% trans
>> 'Documentation' %} {% endif %}  {% url 'admin:password_change' as
>> password_change_url %}  {% if password_change_url %} 37 > href="{{ password_change_url }}">  {% else %}   40 {% endif %} 41 {% trans 'Change password' %}> a> /
>>
>> What do you think is the problem! I’ve been fighting with this for the
>> pas 15hrs yet no success. Kindly help me out!
>
> I don't spot any immediate reason for your problem. Some more
> information is needed. A full stacktrace is always really good if you
> happen to get one. Maybe the problem is in your admin.py. As said, it
> is hard to say without more information.
>
>  - Anssi
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: No Module named URLS

2012-02-06 Thread akaariai
On Feb 6, 5:09 pm, coded kid  wrote:
> Hey guys, I’m getting an error when trying to visit my admin page:
> TemplateSyntaxError at /admin/
> Caught ImportError while rendering: No module named urls
>
> In urls.py
> from django.conf.urls.defaults import patterns, include, url
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> (r'^admin/',include(admin.site.urls)),
> )
>
> In Template.py
>
>    
> {% block branding %}{% endblock %}
>   {% if user.is_active and user.is_staff %}
>    {% trans 'Welcome,' %}  {% filter
> force_escape %}{% firstof user.first_name user.username %}{% endfilter
> %}.
>  {% block userlinks %} {% url 'django-admindocs-docroot' as docsroot
> %}  {% if docsroot %}  {% trans
> 'Documentation' %} {% endif %}  {% url 'admin:password_change' as
> password_change_url %}  {% if password_change_url %} 37  href="{{ password_change_url }}">  {% else %}   40 {% endif %} 41 {% trans 'Change password' %} a> /
>
> What do you think is the problem! I’ve been fighting with this for the
> pas 15hrs yet no success. Kindly help me out!

I don't spot any immediate reason for your problem. Some more
information is needed. A full stacktrace is always really good if you
happen to get one. Maybe the problem is in your admin.py. As said, it
is hard to say without more information.

 - Anssi

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: No module named urls

2010-02-08 Thread Brian
Aaargh! I knew it had to be something like that!

Thanx Karen.

On Feb 7, 5:20 pm, Karen Tracey  wrote:
> On Sun, Feb 7, 2010 at 4:27 PM, Brian  wrote:
> > Hi all,
>
> > I'm putting together a Django application from scratch and have
> > created my models. I'm trying to activate the admin site now and am
> > getting the above error. I've tried everything I found on mailing
> > lists with no luck. This includes the old style settings.py (which is
> > commented out now) as well as the new. Note, the model has synced to
> > the database correctly.
>
> > Here is the contents of the admin.py file which resides in my app
> > directory (triagedb/triagedb_app):
>
> > [snip]
> > Here is my settings file:
> > [snip]
>
> > ROOT_URLCONF = 'triagedb_app.urls'
>
> > [snip]
>
> > INSTALLED_APPS = (
> >    #'django.contrib.auth',
> >    #'django.contrib.contenttypes',
> >    'django.contrib.sessions',
> >    'django.contrib.sites',
> >    'django.contrib.admin',
> >    'triagedb.triagedb_app',
> > )
>
> > Here is my urls..py file:
> > [snip]
>
> The urls.py file you show looks like it is a base project urls.py file,
> auto-created perhaps when you ran django-admin.py startproject triagedb.
> That file would have been place in triagedb/urls.py. Yet your ROOT_URLCONF
> settings is ''triagedb_app.urls", which will be looking to load
> triagedb_app/urls.py from somewhere in the Python path. Where exactly is
> this urls.py file located?  If it is really in triagedb/urls.py then the
> URLCONF setting should be 'triagedb.urls'.
>
> Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: No module named urls

2010-02-07 Thread Karen Tracey
On Sun, Feb 7, 2010 at 4:27 PM, Brian  wrote:

> Hi all,
>
> I'm putting together a Django application from scratch and have
> created my models. I'm trying to activate the admin site now and am
> getting the above error. I've tried everything I found on mailing
> lists with no luck. This includes the old style settings.py (which is
> commented out now) as well as the new. Note, the model has synced to
> the database correctly.
>
> Here is the contents of the admin.py file which resides in my app
> directory (triagedb/triagedb_app):
>
> [snip]
> Here is my settings file:
> [snip]
>
> ROOT_URLCONF = 'triagedb_app.urls'
>
> [snip]
>
> INSTALLED_APPS = (
>#'django.contrib.auth',
>#'django.contrib.contenttypes',
>'django.contrib.sessions',
>'django.contrib.sites',
>'django.contrib.admin',
>'triagedb.triagedb_app',
> )
>
> Here is my urls..py file:
> [snip]
>

The urls.py file you show looks like it is a base project urls.py file,
auto-created perhaps when you ran django-admin.py startproject triagedb.
That file would have been place in triagedb/urls.py. Yet your ROOT_URLCONF
settings is ''triagedb_app.urls", which will be looking to load
triagedb_app/urls.py from somewhere in the Python path. Where exactly is
this urls.py file located?  If it is really in triagedb/urls.py then the
URLCONF setting should be 'triagedb.urls'.

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: No module named urls (again)

2009-12-16 Thread Pablo Solera
Hi Michael,

Thanks for your suggestion.
I´ve added the whole project to the PYTHONPATH under
project->properties->PYTHONPATH->Add source folder
And now it works!


I had to solve an additional error, the app couldn´t find my
"templates" dir.

When running the server on eclipse, it threw an error
"TemplateDoesNotExist at /".
It was trying to take the template from "c:\eclipse\templates
\temp.html"
So I changed the settings variable template_dirs from "templates/", to
'E:/dev/nav/pr1/templates/'
Don´t know why the relative didn´t work.

Anyway, this is now working.

For future reference, if anyone has this problem, check also if your
manage.py it´s on the root folder, not on the src.

Thanks again for your help.

Pablo Solera


On Dec 15, 9:38 pm, Michael K  wrote:
> On Dec 15, 3:18 pm, Pablo Solera  wrote:
>
> > When I try to run the same server from eclipse, it seems that
> > something is not correct.
> > I got the error: ImportError at / "No module named urls"
> > I do have the urls.py on my application, and averything works fine out
> > of eclipse.
>
> > Could it be a PATH problem? How could I debug it?
>
> Did you add your project path to the PYTHONPATH environment variable
> in your Run profile?  That's what the problem sounds like - Eclipse's
> environment doesn't know to tell Python that your Django project needs
> to be in the PYTHONPATH.
>
> --
> Michael

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: No module named urls (again)

2009-12-15 Thread Michael K


On Dec 15, 3:18 pm, Pablo Solera  wrote:
> When I try to run the same server from eclipse, it seems that
> something is not correct.
> I got the error: ImportError at / "No module named urls"
> I do have the urls.py on my application, and averything works fine out
> of eclipse.
>
> Could it be a PATH problem? How could I debug it?

Did you add your project path to the PYTHONPATH environment variable
in your Run profile?  That's what the problem sounds like - Eclipse's
environment doesn't know to tell Python that your Django project needs
to be in the PYTHONPATH.

--
Michael

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: No module named urls

2008-12-08 Thread TheIvIaxx

Ok, i got it all sorted out.  Thanks Rob and Malcom.  It was a problem
in my  accounts.urls.py file.  I had made some placeholder urls to
edit and save but never put them into the view.py.  I commented them
out for now and it worked like a champ.

Its wierd this never poped up in my windows box useing manage.py
runserver, but off the linux box it freaked out.

Thanks again!
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-12-04 Thread Rob Hudson

On Dec 4, 12:59 am, Rob Hudson <[EMAIL PROTECTED]> wrote:

> I'll keep poking around a bit and see if I can dig up anything
> further.

I think I tracked it down...

Looking at the tracebacks above, you can see the first time through,
it winds up on line 198 which tries to import the urls.py file.  In my
particular case, the urlconf_name was "profiles.urls".  And indeed, my
local (in my project) profiles app does not have a urls.py file in
it.  If I `touch profiles/urls.py` things work, sort of.

The thing is, I'm using James Bennett's django-profiles package and
it's not in my project but it's on my Python path.  There are no
models, so I never put it in my INSTALLED_APPS (though reading now,
the docs say I should have)... I only reference the profiles.urls in
my root urls via include(), and that pulls in the urls from the
profiles app on my Python path.  I have a local project app also
called profiles, however, that doesn't include a urls.py (because I'm
using the one from James'), and this is the reason for the breakage.

Having the app named `profiles` is the perfect name but it can't exist
on my Python path and in my project without a conflict.  I tested
renaming mine, putting the "profiles" in my INSTALLED_APPS, and all is
well now.

-Rob
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-12-04 Thread Rob Hudson

On Dec 3, 11:01 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> This is an area where Django has poor error handling and we're slowly
> cutting them down. So you have to do a bit of commenting out and
> experimenting on the command line (just try a simple reverse() call each
> time to trigger it) to work out the problem.
>
> It's the first error that you should pay attention to here. Subsequent
> "successes" are misleading -- they're not raising errors, but something
> is still not working properly.

Is this helpful at all then?

This is importing `reverse` and running it twice with the same URL
named view where I'm seeing the error.  I'm doing it twice to see the
difference...

>>> from django.core.urlresolvers import reverse as r
>>> r('django-admindocs-docroot')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 254, in reverse
*args, **kwargs)))
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 227, in reverse
possibilities = self.reverse_dict.getlist(lookup_view)
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 161, in _get_reverse_dict
for name in pattern.reverse_dict:
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 154, in _get_reverse_dict
if not self._reverse_dict and hasattr(self.urlconf_module,
'urlpatterns'):
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 198, in _get_urlconf_module
self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
ImportError: No module named urls
>>> r('django-admindocs-docroot')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 254, in reverse
*args, **kwargs)))
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 243, in reverse
"arguments '%s' not found." % (lookup_view, args, kwargs))
NoReverseMatch: Reverse for 'django-admindocs-docroot' with arguments
'()' and keyword arguments '{}' not found.


I was suspecting that not having this line in my urls.py was tripping
it up so I added it:

(r'^admin/doc/', include('django.contrib.admindocs.urls')),

A slight difference was observed...

>>> from django.core.urlresolvers import reverse as r
>>> r('django-admindocs-docroot')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 254, in reverse
*args, **kwargs)))
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 227, in reverse
possibilities = self.reverse_dict.getlist(lookup_view)
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 161, in _get_reverse_dict
for name in pattern.reverse_dict:
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 154, in _get_reverse_dict
if not self._reverse_dict and hasattr(self.urlconf_module,
'urlpatterns'):
  File "/Users/rob/django/django-trunk/django/core/urlresolvers.py",
line 198, in _get_urlconf_module
self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
ImportError: No module named urls
>>> r('django-admindocs-docroot')
'/admin/doc/'

I'll keep poking around a bit and see if I can dig up anything
further.

-Rob
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-12-03 Thread Malcolm Tredinnick


On Wed, 2008-12-03 at 22:49 -0800, Rob Hudson wrote:
> It's odd... I'm getting the exact same error at the exact same spot,
> running Django trunk r9550.  What's strange is that it gets the 500
> error on first request, and is ok all subsequent requests.

That type of error means there's a problem importing something that the
urls depends on. The first time around, the import attempt is raising an
error. The next time around, the broken module is already "imported" (in
the sense of bits of it being in sys.modules) and so a repeat attempt
isn't made. Reversing URLs has to process all of your URLconf file, so
the error isn't necessarily in the exact are you're reversing. It could
be some view function somewhere in a nested URL Conf that is imported as
part of working out all the reversable possibilities.

This is an area where Django has poor error handling and we're slowly
cutting them down. So you have to do a bit of commenting out and
experimenting on the command line (just try a simple reverse() call each
time to trigger it) to work out the problem.

It's the first error that you should pay attention to here. Subsequent
"successes" are misleading -- they're not raising errors, but something
is still not working properly.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-12-03 Thread Rob Hudson

It's odd... I'm getting the exact same error at the exact same spot,
running Django trunk r9550.  What's strange is that it gets the 500
error on first request, and is ok all subsequent requests.

On Nov 26, 9:34 am, TheIvIaxx <[EMAIL PROTECTED]> wrote:
> So i've narrowed down the problem more.  Its failing on the template
> call to {% url django-admindocs-docroot as docsroot %} on the admin
> page and all other pages.  If i remove this line, the site works just
> fine, recognizing all urls defined.  Not sure just the template engine
> would fail to see the urls.py, but everything else does.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-11-26 Thread TheIvIaxx

So i've narrowed down the problem more.  Its failing on the template
call to {% url django-admindocs-docroot as docsroot %} on the admin
page and all other pages.  If i remove this line, the site works just
fine, recognizing all urls defined.  Not sure just the template engine
would fail to see the urls.py, but everything else does.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-11-25 Thread TheIvIaxx

Its going to be running on apache, but right now im getting this error
on the development server for django.  The PYTHONPATH in the error has
the project dir in it.  I verified that PYTHONPATH has the project dir
from putty.  Not sure what else to try.  Oh and starting the shell
from a temp dir, importing urls went fine.


On Nov 25, 11:32 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > I just moved my site to a production environment and i get
> > this error when trying to view the admin stuff.  I want to say
> > its a path issue? If i use manage.py shell, i can import urls
> > just fine.  Any ideas on why this error is popping up?
>
> My first thought concurs with your path issue.  What's your
> server setup (Apache?  lighttpd?) and within that config, what's
> your $PYTHONPATH set to?  My guess is that it doesn't include the
> directory containing your urls.py which, for mod_python would be
> a line like
>
>    PythonPath "['/path/to/project'] + sys.path"
>
> Since it's working from your manage.py shell, are you either
> running manage.py from within that directory (if so, try running
> it from another directory such as
>
>    cd ~/tmp
>    ~/dev/proj/manage.py shell
>
> to see if it still works), or do you set your $PYTHONPATH in your
> current shell (such as your .bashrc)?
>
> -tim
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-11-25 Thread Tim Chase

> I just moved my site to a production environment and i get
> this error when trying to view the admin stuff.  I want to say
> its a path issue? If i use manage.py shell, i can import urls
> just fine.  Any ideas on why this error is popping up?

My first thought concurs with your path issue.  What's your 
server setup (Apache?  lighttpd?) and within that config, what's 
your $PYTHONPATH set to?  My guess is that it doesn't include the 
directory containing your urls.py which, for mod_python would be 
a line like

   PythonPath "['/path/to/project'] + sys.path"

Since it's working from your manage.py shell, are you either 
running manage.py from within that directory (if so, try running 
it from another directory such as

   cd ~/tmp
   ~/dev/proj/manage.py shell

to see if it still works), or do you set your $PYTHONPATH in your 
current shell (such as your .bashrc)?

-tim








--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: No module named urls

2008-09-11 Thread Geir Gunnarsson

Hi,

This same error materialized in another way in my case. It said:

  Caught an exception while rendering: Tried change_stage in module
django.contrib.admin.views.main. Error was: 'module' object has no
attribute 'change_stage'

I spent half a day figuring this out with the help of this thread. It
turned out that the cause, in my case, was because I missed a pre-1.0-
style admin entry in
an urls.py that was included in the main urls.py.

My problem was solved as soon as I changed that to the 1.0 preferred
way as specified in:

http://docs.djangoproject.com/en/dev/intro/tutorial02/#activate-the-admin-site

Just thought I'd post this as an addition to this thread in case
anyone else has the same problem.


-geir

On Aug 14, 10:48 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Thu, Aug 14, 2008 at 6:42 PM, tooper gao <[EMAIL PROTECTED]> wrote:
>
> > how can you change it ? and I have this errors too.
>
> For the specific error mentioned by the original poster, it's the first
> change noted here:
>
> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Merge...
>
> that is, the change in urlconfs.  There will be more changes needed in your
> code, to move admin declarations out of the model classes, all documented
> there.
>
> Karen

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---