Django admin page hangs in django server - where is web server error log?

877 views
Skip to first unread message

adelein

unread,
Apr 11, 2009, 3:42:11 PM4/11/09
to Django users
Hi,

My http://localhost:8000/admin page is hanging in the django server
and I get "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error."
after a while.

I am running on fedora 7.

I am following the django tutorial and I am using the latest svn
django version.

After I set this in the settings.py and go to the http://localhost:8000/admin
page it just hangs:

from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Example:
# (r'^mysite/', include('mysite.foo.urls')),

# Uncomment the admin/doc line below and add
'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)

First, I dont know how to access the web server error log?

Anyone has any idea?



Thanks!

-Adelein


Daniel Roseman

unread,
Apr 11, 2009, 4:58:20 PM4/11/09
to Django users
On Apr 11, 8:42 pm, adelein <adele...@gmail.com> wrote:
> Hi,
>
> Myhttp://localhost:8000/adminpage is hanging in the django server
> and I get "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error."
> after a while.
>
> I am running on fedora 7.
>
> I am following the django tutorial and I am using the latest svn
> django version.
>
> After I set this in the settings.py and go to thehttp://localhost:8000/admin
> page it just hangs:
>
> from django.conf.urls.defaults import *
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
>     # Example:
>     # (r'^mysite/', include('mysite.foo.urls')),
>
>     # Uncomment the admin/doc line below and add
> 'django.contrib.admindocs'
>     # to INSTALLED_APPS to enable admin documentation:
>     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
>     # Uncomment the next line to enable the admin:
>     (r'^admin/', include(admin.site.urls)),
> )
>
> First, I dont know how to access the web server error log?
>
> Anyone has any idea?
>
> Thanks!
>
> -Adelein

If that's your settings.py, you should go back and read the tutorial
again. That code should go in your urls.py.

I assume by 'the Django server' you mean the built-in development
server. As the name implies, this is only for development, and doesn't
have an 'error log'. All errors are displayed in the console.
--
DR.

adelein

unread,
Apr 11, 2009, 8:09:33 PM4/11/09
to Django users

Hi,

Sorry, I meant to say urls.py of course. So, given I did put the code
in the right file, the problem still remains.


-Adelein


On Apr 11, 1:58 pm, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On Apr 11, 8:42 pm, adelein <adele...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > Myhttp://localhost:8000/adminpageis hanging in the django server

Malcolm Tredinnick

unread,
Apr 11, 2009, 8:17:33 PM4/11/09
to django...@googlegroups.com
On Sat, 2009-04-11 at 17:09 -0700, adelein wrote:
>
> Hi,
>
> Sorry, I meant to say urls.py of course. So, given I did put the code
> in the right file, the problem still remains.

If you're following the tutorial, then you will be running the
development server. So all "server log" style output will be printed to
the terminal that you used to start the server.

Regards,
Malcolm


adelein

unread,
Apr 11, 2009, 8:21:46 PM4/11/09
to Django users
Yes, and I see no errors there. Still the admin page does not load at
all. I cant find any similar problems through google.

On Apr 11, 5:17 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:

adelein

unread,
Apr 11, 2009, 8:23:12 PM4/11/09
to Django users
This is the server output:


[root@bellatrix djangoblog]# python manage.py runserver
93.186.171.54:8001
Validating models...
0 errors found

Django version 1.1 beta 1 SVN-10504, using settings
'djangoblog.settings'
Development server is running at http://93.186.171.54:8001/
Quit the server with CONTROL-C.


So no errors. Yet admin page is blank as you can see if you go to
http://93.186.171.54:8001/admin.

Zain Memon

unread,
Apr 11, 2009, 8:35:14 PM4/11/09
to django...@googlegroups.com
Since no messages are shown in the log, the connection is most likely being blocked somewhere upstream. Check that you've allowed port 8001 through any firewalls or routers you have set up. 

Zain

adelein

unread,
Apr 11, 2009, 8:40:24 PM4/11/09
to Django users
Hi Zain,

The thing is that I was able to access the main page before I changed
the urls.py file, so I think that means that the port isnt being
blocked. Something to do with the urls.py file is messed up : (

Thanks


On Apr 11, 5:35 pm, Zain Memon <z...@inzain.net> wrote:
> Since no messages are shown in the log, the connection is most likely being
> blocked somewhere upstream. Check that you've allowed port 8001 through any
> firewalls or routers you have set up.
> Zain
>
> On Sat, Apr 11, 2009 at 5:23 PM, adelein <adele...@gmail.com> wrote:
>
> > This is the server output:
>
> > [root@bellatrix djangoblog]# python manage.py runserver
> > 93.186.171.54:8001
> > Validating models...
> > 0 errors found
>
> > Django version 1.1 beta 1 SVN-10504, using settings
> > 'djangoblog.settings'
> > Development server is running athttp://93.186.171.54:8001/

Malcolm Tredinnick

unread,
Apr 11, 2009, 8:50:41 PM4/11/09
to django...@googlegroups.com
On Sat, 2009-04-11 at 17:40 -0700, adelein wrote:
> Hi Zain,
>
> The thing is that I was able to access the main page before I changed
> the urls.py file, so I think that means that the port isnt being
> blocked. Something to do with the urls.py file is messed up : (

Then go back and try things out slowly. Firstly, don't try to work on an
external IP address. Just test on localhost, since that removes one
variable that isn't necessary. Make sure that removing the admin line
from urls.py does make things go back to working again when you're
accessing on localhost. Then compare your urls.py to what is in the
tutorial very carefully (I can't see anything's that different just from
looking at it quickly).

If the admin url template was broken, we'd hear about it very quickly. I
worked through the tutorial yesterday from beginning to end and
encountered no problems with access, so you're right in thinking it's
something different about your particular setup.

If all else fails, go back to the start and try again in a different
directory. You already have the Poll model, so you won't have to type
that in again. Start from "django-admin.py startproject", set up
settings.py, run "startapp polls" and copy in your existing models.py
file. Test things on localhost and it should work. Then you have two
versions to compare.

Regards,
Malcolm


Reply all
Reply to author
Forward
0 new messages