Re: ImportError: No module named urls

2011-06-03 Thread Kann
Thanks, it works now. :D

On Jun 3, 2:14 pm, Kenneth Gonsalves  wrote:
> On Fri, 2011-06-03 at 05:07 -0700, Kann wrote:
> > > you have a file called mirnaweb.py - your path should contain only
> > the
> > > parent directory to your mirnaweb directory. Python is now looking
> > for
> > > settings inside mirnaweb.py
>
> > OK, now I changed the setting file into mirna_settings.py to avoid the
> > confusion with the directory name. I also include the new setting file
> > to django.wsgi file and telling the sys.path to append the new
> > PYTHONPATH. I wonder why Python still could not see the modules inside
> > my django project.
>
> > Also, I tried running the "python manage.py shell" again and it's
> > still looking for the "settings.py". Why is that?
>
> rename your mirnaweb.py file and change your settings file back to
> settings.py
> --
> regards
> KGhttp://lawgon.livejournal.com
> Coimbatore LUG roxhttp://ilugcbe.techstud.org/

-- 
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: ImportError: No module named urls

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 05:07 -0700, Kann wrote:
> > you have a file called mirnaweb.py - your path should contain only
> the
> > parent directory to your mirnaweb directory. Python is now looking
> for
> > settings inside mirnaweb.py
> 
> OK, now I changed the setting file into mirna_settings.py to avoid the
> confusion with the directory name. I also include the new setting file
> to django.wsgi file and telling the sys.path to append the new
> PYTHONPATH. I wonder why Python still could not see the modules inside
> my django project.
> 
> Also, I tried running the "python manage.py shell" again and it's
> still looking for the "settings.py". Why is that? 

rename your mirnaweb.py file and change your settings file back to
settings.py
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

-- 
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: ImportError: No module named urls

2011-06-03 Thread Kann
> you have a file called mirnaweb.py - your path should contain only the
> parent directory to your mirnaweb directory. Python is now looking for
> settings inside mirnaweb.py

OK, now I changed the setting file into mirna_settings.py to avoid the
confusion with the directory name. I also include the new setting file
to django.wsgi file and telling the sys.path to append the new
PYTHONPATH. I wonder why Python still could not see the modules inside
my django project.

Also, I tried running the "python manage.py shell" again and it's
still looking for the "settings.py". Why is that?

Kann

On Jun 3, 1:56 pm, Kenneth Gonsalves  wrote:
> On Fri, 2011-06-03 at 04:44 -0700, Kann wrote:
> > Below is what I just did. Does this mean that I still have problem
> > with my pythonpath?
>
> yes
>
>
>
> > [xxx@lagrange mirnaweb]$ python manage.py
> > Error: Can't find the file 'settings.py' in the directory containing
> > 'manage.py'. It appears you've customized things.
> > You'll have to run django-admin.py, passing it your settings module.
> > (If the file settings.py does indeed exist, it's causing an
> > ImportError somehow.)
>
> you have a file called mirnaweb.py - your path should contain only the
> parent directory to your mirnaweb directory. Python is now looking for
> settings inside mirnaweb.py
> --
> regards
> KGhttp://lawgon.livejournal.com
> Coimbatore LUG roxhttp://ilugcbe.techstud.org/

-- 
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: ImportError: No module named urls

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 04:44 -0700, Kann wrote:
> Below is what I just did. Does this mean that I still have problem
> with my pythonpath?

yes
> 
> [xxx@lagrange mirnaweb]$ python manage.py
> Error: Can't find the file 'settings.py' in the directory containing
> 'manage.py'. It appears you've customized things.
> You'll have to run django-admin.py, passing it your settings module.
> (If the file settings.py does indeed exist, it's causing an
> ImportError somehow.)

you have a file called mirnaweb.py - your path should contain only the
parent directory to your mirnaweb directory. Python is now looking for
settings inside mirnaweb.py
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

-- 
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: ImportError: No module named urls

2011-06-03 Thread Kann
Hi Kenneth,

Below is what I just did. Does this mean that I still have problem
with my pythonpath?

[xxx@lagrange mirnaweb]$ python manage.py
Error: Can't find the file 'settings.py' in the directory containing
'manage.py'. It appears you've customized things.
You'll have to run django-admin.py, passing it your settings module.
(If the file settings.py does indeed exist, it's causing an
ImportError somehow.)


[xxx@lagrange mirnaweb]$ django-admin.py shell
Error: Could not import settings 'mirnaweb' (Is it on sys.path? Does
it have syntax errors?): No module named mirnaweb


[xxx@lagrange mirnaweb]$ django-admin.py shell --settings='mirnaweb' --
pythonpath='/srv/mirnaweb'
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import urls
>>>


Kann



On Jun 3, 1:16 pm, Kenneth Gonsalves  wrote:
> On Fri, 2011-06-03 at 04:11 -0700, Kann wrote:
> > [Fri Jun 03 13:04:32 2011] [error] [client 127.0.0.1] ImportError: No
> > module named urls
>
> no module named urls can also mean that urls.py has errors. From the
> shell try to import urls
> --
> regards
> KGhttp://lawgon.livejournal.com
> Coimbatore LUG roxhttp://ilugcbe.techstud.org/

-- 
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: ImportError: No module named urls

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 04:11 -0700, Kann wrote:
> [Fri Jun 03 13:04:32 2011] [error] [client 127.0.0.1] ImportError: No
> module named urls 

no module named urls can also mean that urls.py has errors. From the
shell try to import urls
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

-- 
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: ImportError: No module named urls

2009-07-13 Thread huw_at1

Ah fantastic many thanks.

All working nicely now much appreciated.

On Jul 10, 4:16 pm, Russell Keith-Magee 
wrote:
> On Fri, Jul 10, 2009 at 10:33 PM, huw_at1 wrote:
>
> > So I switched from mod_python to mod_wsgi since I don;t really know
> > what is going on and I realise mod_wsgi is recommended for 1.1 now.
> > Anyway the rest of my site works fine now. The only part still not
> > working is the admin section which fails with this "No module named
> > urls" error as can be seen in the traceback above.
>
> > For my settings I have the root urlconf as "myapp.urls".
>
> > In the urls file I have:
>
> > (r'^admin/(.*)', include('admin.site.urls')),
>
> > as is specified in the latest release notes.
>
> That isn't what the release notes say - the new form for the admin includes 
> is:
>
> (r'^admin/', include(admin.site.urls)),
>
> Note that there is no need for the wildcard regex pattern, and there
> are no quotes around admin.site.urls - it isn't a string, it's an
> attribute on the site object. This form was introduced for Django
> v1.1.
>
> However, the old form ( the same as your include('admin.site.root') )
> should continue to work. This form has been officially deprecated, but
> it is guaranteed to work until the release of Django v1.3 (i.e., two
> full releases in a deprecated state).
>
> Yours,
> Russ Magee %-)
--~--~-~--~~~---~--~~
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: ImportError: No module named urls

2009-07-11 Thread Karen Tracey
On Sat, Jul 11, 2009 at 12:26 PM, selcukcihan  wrote:

>
> Using trunk with apache + mod_wsgi,
>
> Hi, i also have url problems with admin. First of all, if i use the
> depreciated method(r'^admin/(.*)', admin.site.root) everything works
> fine.
>
> Well, since there is a new method, i switched to it; using
> (r'^admin/', include(admin.site.urls)).
>
> The problem is on www.mydomain.com/admin/ the links for "change
> password" and "logout" (by default on the top right) are corrupt. For
> instance, change password link reads
> http://www.mydomain.com/admin/admin/password_change/
> it seems that the url is formed by appending "admin/password_change/"
> to the current page's url, rather than appending to site root.
>
> The problem can be found on each page inside admin, for instance on
> users page (http://www.mydomain.com/admin/auth/user/) the link for
> change password reads
> http://www.mydomain.com/admin/auth/user/admin/password_change/
>
> see the pattern?
>
> i could not figure out what is causing the problem, any idea/pointer
> truely appreciated


(This question doesn't really seem to have anything to do with the original
thread topic? While your question has to do with urls and this thread title
has an exception that mentions urls, you are not seeing that exception so it
probably would have been better to start a new thread.  Mushing every
conversation that has anything to do with urls into a single thread on this
mailing list would make for one very confusing and disjointed thread.)

What you have described is:

http://code.djangoproject.com/ticket/10061

This ticket is the big blocker for getting 1.1 finalized, and is being
actively worked on.  It has a patch you could try.

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



Re: ImportError: No module named urls

2009-07-11 Thread selcukcihan

Using trunk with apache + mod_wsgi,

Hi, i also have url problems with admin. First of all, if i use the
depreciated method(r'^admin/(.*)', admin.site.root) everything works
fine.

Well, since there is a new method, i switched to it; using
(r'^admin/', include(admin.site.urls)).

The problem is on www.mydomain.com/admin/ the links for "change
password" and "logout" (by default on the top right) are corrupt. For
instance, change password link reads 
http://www.mydomain.com/admin/admin/password_change/
it seems that the url is formed by appending "admin/password_change/"
to the current page's url, rather than appending to site root.

The problem can be found on each page inside admin, for instance on
users page (http://www.mydomain.com/admin/auth/user/) the link for
change password reads 
http://www.mydomain.com/admin/auth/user/admin/password_change/

see the pattern?

i could not figure out what is causing the problem, any idea/pointer
truely appreciated

On Jul 10, 6:16 pm, Russell Keith-Magee 
wrote:
> On Fri, Jul 10, 2009 at 10:33 PM, huw_at1 wrote:
>
> That isn't what the release notes say - the new form for theadminincludes is:
>
> (r'^admin/', include(admin.site.urls)),
>
> Russ Magee %-)

--~--~-~--~~~---~--~~
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: ImportError: No module named urls

2009-07-10 Thread Russell Keith-Magee

On Fri, Jul 10, 2009 at 10:33 PM, huw_at1 wrote:
>
> So I switched from mod_python to mod_wsgi since I don;t really know
> what is going on and I realise mod_wsgi is recommended for 1.1 now.
> Anyway the rest of my site works fine now. The only part still not
> working is the admin section which fails with this "No module named
> urls" error as can be seen in the traceback above.
>
> For my settings I have the root urlconf as "myapp.urls".
>
> In the urls file I have:
>
> (r'^admin/(.*)', include('admin.site.urls')),
>
> as is specified in the latest release notes.

That isn't what the release notes say - the new form for the admin includes is:

(r'^admin/', include(admin.site.urls)),

Note that there is no need for the wildcard regex pattern, and there
are no quotes around admin.site.urls - it isn't a string, it's an
attribute on the site object. This form was introduced for Django
v1.1.

However, the old form ( the same as your include('admin.site.root') )
should continue to work. This form has been officially deprecated, but
it is guaranteed to work until the release of Django v1.3 (i.e., two
full releases in a deprecated state).

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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: ImportError: No module named urls

2009-07-10 Thread huw_at1

So I switched from mod_python to mod_wsgi since I don;t really know
what is going on and I realise mod_wsgi is recommended for 1.1 now.
Anyway the rest of my site works fine now. The only part still not
working is the admin section which fails with this "No module named
urls" error as can be seen in the traceback above.

For my settings I have the root urlconf as "myapp.urls".

In the urls file I have:

(r'^admin/(.*)', include('admin.site.urls')),

as is specified in the latest release notes. Although googling around
it is confusing as to whether this should be used or:

(r'^admin/(.*)', include('admin.site.root')),

should be used. Also I'm not sure if I should substitute "site" for
"myapp" in here.

Again I have found a couple of threads where someone has experienced
something similar better exaclty the same as what I am experiencing.
Any further suggestions?

Many thanks

On Jul 9, 5:44 pm, huw_at1  wrote:
> Hmm I didn't change any imports as far as i am aware.
>
> By full traceback do you mean the entirety of the error in the error
> log?
>
> Such as:
>
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] mod_python
> (pid=26734, interpreter='ccprod.arrowt.co.uk', phase='PythonHandler',
> handler='django.core.handlers.modpython'): Application error
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] ServerName:
> 'ccprod.arrowt.co.uk'
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] DocumentRoot:
> '/var/www'
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] URI: '/admin'
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Location: '/'
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Directory:
> None
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Filename: '/
> var/www/admin'
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] PathInfo: ''
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Traceback
> (most recent call last):
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/mod_python/importer.py", line 1542, in
> HandlerDispatch\n    default=default_handler, arg=req,
> silent=hlist.silent)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/mod_python/importer.py", line 1234, in
> _process_target\n    result = _execute_target(config, req, object,
> arg)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/mod_python/importer.py", line 1133, in
> _execute_target\n    result = object(arg)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/handlers/modpython.py", line
> 228, in handler\n    return ModPythonHandler()(req)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/handlers/modpython.py", line
> 201, in __call__\n    response = self.get_response(request)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/handlers/base.py", line 73, in
> get_response\n    response = middleware_method(request)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/middleware/common.py", line 57, in
> process_request\n    _is_valid_path("%s/" % request.path_info)):
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/middleware/common.py", line 142, in
> _is_valid_path\n    urlresolvers.resolve(path)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/urlresolvers.py", line 262, in
> resolve\n    return get_resolver(urlconf).resolve(path)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/urlresolvers.py", line 186, in
> resolve\n    sub_match = pattern.resolve(new_path)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/urlresolvers.py", line 184, in
> resolve\n    for pattern in self.url_patterns:
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/urlresolvers.py", line 213, in
> _get_url_patterns\n    patterns = getattr(self.urlconf_module,
> "urlpatterns", self.urlconf_module)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/core/urlresolvers.py", line 208, in
> _get_urlconf_module\n    self._urlconf_module = import_module
> (self.urlconf_name)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
> lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in
> import_module\n    __import__(name)
> [Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] ImportError:
> No module named urls
>
> On 9 July, 16:59, Friðrik Már Jónsson  wrote:
>
> > Hey!

Re: ImportError: No module named urls

2009-07-09 Thread huw_at1

Hmm I didn't change any imports as far as i am aware.

By full traceback do you mean the entirety of the error in the error
log?

Such as:

[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] mod_python
(pid=26734, interpreter='ccprod.arrowt.co.uk', phase='PythonHandler',
handler='django.core.handlers.modpython'): Application error
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] ServerName:
'ccprod.arrowt.co.uk'
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] DocumentRoot:
'/var/www'
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] URI: '/admin'
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Location: '/'
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Directory:
None
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Filename: '/
var/www/admin'
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] PathInfo: ''
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] Traceback
(most recent call last):
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/mod_python/importer.py", line 1542, in
HandlerDispatch\ndefault=default_handler, arg=req,
silent=hlist.silent)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/mod_python/importer.py", line 1234, in
_process_target\nresult = _execute_target(config, req, object,
arg)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/mod_python/importer.py", line 1133, in
_execute_target\nresult = object(arg)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/handlers/modpython.py", line
228, in handler\nreturn ModPythonHandler()(req)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/handlers/modpython.py", line
201, in __call__\nresponse = self.get_response(request)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/handlers/base.py", line 73, in
get_response\nresponse = middleware_method(request)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/middleware/common.py", line 57, in
process_request\n_is_valid_path("%s/" % request.path_info)):
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/middleware/common.py", line 142, in
_is_valid_path\nurlresolvers.resolve(path)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/urlresolvers.py", line 262, in
resolve\nreturn get_resolver(urlconf).resolve(path)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/urlresolvers.py", line 186, in
resolve\nsub_match = pattern.resolve(new_path)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/urlresolvers.py", line 184, in
resolve\nfor pattern in self.url_patterns:
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/urlresolvers.py", line 213, in
_get_url_patterns\npatterns = getattr(self.urlconf_module,
"urlpatterns", self.urlconf_module)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/core/urlresolvers.py", line 208, in
_get_urlconf_module\nself._urlconf_module = import_module
(self.urlconf_name)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20]   File "/usr/
lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in
import_module\n__import__(name)
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] ImportError:
No module named urls


On 9 July, 16:59, Friðrik Már Jónsson  wrote:
> Hey!
>
> A full traceback could be helpful.
>
> A lot of time when you've got really strange import errors they have  
> something to do with circular imports. Did you change any imports  
> right before or after the upgrade?
>
> Regards,
> Friðrik Már
>
> On Jul 9, 2009, at 3:25 PM, huw_at1 wrote:
>
>
>
> > Hi all,
>
> > I have just been moving my website to a production server and am
> > having some difficulty getting it working. I have upgraded the Django
> > from 1.0 on my development server to 1.1 on the production server.
> > When I try to access the admin pages I get an Internal Server Error
> > and a message in the apache logs stating "Import Error: No module
> > named urls". I have tried running the shell and importing the urls
> > module from within and outside of the local directory both of which
> > work fine.
>
> > I'm guessing it's either some value in my settings file or something
> > is non-backwards compatible going from 1.0 to 1.1 but I am a bit
> > clueless as to what atm. Any suggestions would be most welcome.
>
> > Many thanks
--~--~

Re: ImportError: No module named urls

2009-07-09 Thread Friðrik Már Jónsson

Hey!

A full traceback could be helpful.

A lot of time when you've got really strange import errors they have  
something to do with circular imports. Did you change any imports  
right before or after the upgrade?

Regards,
Friðrik Már

On Jul 9, 2009, at 3:25 PM, huw_at1 wrote:

>
> Hi all,
>
> I have just been moving my website to a production server and am
> having some difficulty getting it working. I have upgraded the Django
> from 1.0 on my development server to 1.1 on the production server.
> When I try to access the admin pages I get an Internal Server Error
> and a message in the apache logs stating "Import Error: No module
> named urls". I have tried running the shell and importing the urls
> module from within and outside of the local directory both of which
> work fine.
>
> I'm guessing it's either some value in my settings file or something
> is non-backwards compatible going from 1.0 to 1.1 but I am a bit
> clueless as to what atm. Any suggestions would be most welcome.
>
> Many thanks
> >


--~--~-~--~~~---~--~~
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: ImportError: No module named urls

2008-03-25 Thread Evert Rol

> I am just starting out with django (and python). I have already worked
> through the tutorial successfully; now I am going through it again
> adapting the examples to suit the web app I want to build (a local
> book sharing scheme). What I have done so far is to define the models,
> create the database and tables, and add the admin app to
> INSTALLED_APPS. I have uncommmented the line in urls.py so that it now
> looks like this:
>
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('',
># Example:
># (r'^horace/', include('horace.apps.foo.urls.foo')),

I might be mistaken, but generally, the include would end with  
'.urls'. It is also likely (depending on your directory structure and  
setup), that the actually include would more like

   include('apps.foo.urls')

assuming 'foo' is an app & subdirectory within the apps directory, and  
contains __init__.py, views.py models.py and urls.py


>
>
># Uncomment this for admin:
> (r'^admin/', include('django.contrib.admin.urls')),
> )
>
> when I start the test server with 'python manage.py runserver', and
> try to look at the admin page at:
> http://127.0.0.1:8000/admin/
> it comes up with a page saying:
>
> ImportError at /admin/
> No module named urls
> Request Method:   GET
> Request URL:  http://127.0.0.1:8000/admin/
> Exception Type:   ImportError
> Exception Value:  No module named urls
> Exception Location:   /var/lib/python-support/python2.5/django/core/
> urlresolvers.py in _get_urlconf_module, line 161
>
> I have checked that the django tutorial app still works, so the
> problem seems to be with what I've done rather than the django
> installation.
>
> any help appreciated. thanks,
>
> andy baxter.
> >


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