Django Admin Page

56 views
Skip to first unread message

Tim Co

unread,
Feb 20, 2015, 1:40:03 AM2/20/15
to django...@googlegroups.com
Hello,

We are trying to run a local development server for our django python app. We are able to connect to our localhost index and get the "It Worked!" Dango page. However when we try to connect to 127.0.0.1/admin/ we are getting an error that the server dropped the connection. Here is the log for the django project:

Exception happened during processing of request from ('130.191.204.231', 62070)
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Library/Python/2.7/site-packages/Django-1.8.dev20141212211410-py2.7.egg/django/core/servers/basehttp.py", line 101, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 649, in __init__
    self.handle()
  File "/Library/Python/2.7/site-packages/Django-1.8.dev20141212211410-py2.7.egg/django/core/servers/basehttp.py", line 173, in handle
    handler.run(self.server.get_app())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 92, in run
    self.close()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/simple_server.py", line 33, in close
    self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'

///////////////////////////////////////////////////////////////////////////////////////////////
Our urls.py file

urls.py

from django.conf.urls import include, url
from django.contrib import admin

admin.autodiscover()

urlpatterns = [
    # Examples:
    # url(r'^$', 'mysite.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
]


///////////////////////////////////////////////////////////////////////////////
settings.py


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'trainstar',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.static",
    "django.core.context_processors.tz",
    'django.contrib.messages.context_processors.messages'
)


ROOT_URLCONF = 'mysite.urls'

WSGI_APPLICATION = 'mysite.wsgi.application'


Please advise. I've exhausted Google/stackoverflow for possible fixes to of no avail. 

ebuild

unread,
Mar 6, 2015, 8:11:07 AM3/6/15
to django...@googlegroups.com
Check django1.8 compatibility with python2.7

Collin Anderson

unread,
Mar 6, 2015, 8:20:02 PM3/6/15
to django...@googlegroups.com
Hi,

That's odd. Maybe try updating django? It looks like you're using 1.8 pre-alpha from 3 months ago.

Collin
Reply all
Reply to author
Forward
0 new messages