开发者

django 61 'connection refused' error on Mac OSX

开发者 https://www.devze.com 2023-03-17 19:51 出处:网络
I installed django-registration 0.8 and after filling the registration form I\'m getting this error. Please suggest what to do now.

I installed django-registration 0.8 and after filling the registration form I'm getting this error. Please suggest what to do now. I'm using Mac OSX and python 2.6.1

This is the error page:

error at /accounts/register/
(61, 'Connection refused')
Request Method: POST
Request URL:    http://127.0.0.1:8000/accounts/register/
Django Version: 1.3
Exception Type: error
Exception Value:    
(61, 'Connection refused')
Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py in create_connection, line 512
Python Executable:  /usr/bin/python
Python Version: 2.6.1
Python Path:    
['/Users/IIC/Documents/dr',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
 '/Library/Python/2.6/site-packages',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
 '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode']
Server time:    Wed, 6 Jul 2011 02:56:36 -0500
Traceback Switch to copy-and-paste view

/Library/Python/2.6/site-packages/django/core/handlers/base.py in get_response
                        response = callback(request, *callback_args, **callback_kwargs) ...
▶ Local vars
/Library/Python/2.6/site-packages/registration/views.py in register
            new_user = backend.register(request, **form.cleaned_data) ...
▶ Local vars
/Library/Python/2.6/site-packages/registration/backends/default/__init__.py in register
                                                                    password, site) ...
▶ Local vars
/Library/Python/2.6/site-packages/django/db/transaction.py in inner
                res = func(*args, **kwargs) ...
▶ Local vars
/Library/Python/2.6/site-packages/registration/models.py in create_inactive_user
            registration_profile.send_activation_email(site) ...
▶ Local vars
/Library/Python/2.6/site-packages/registration/models.py in send_activation_email
        self.user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL) ...
▶ Local vars
/Library/Python/2.6/site-packages/django/contrib/auth/models.py in email_user
        send_mail(subject, message, from_email, [self.email]) ...
▶ Local vars
/Library/Python/2.6/site-packages/django/core/mail/__init__.py in send_mail
                        connection=connection).send() ...
▶ Local vars
/Library/Python/2.6/site-packages/django/core/mail/message.py in send
        return self.get_connection(fail_silently).send_messages([self]) ...
▶ Local vars
/Library/Python/2.6/site-packages/django/core/mail/backends/smtp.py in send_messages
            new_conn_created = self.open() ...
▶ Local vars
/Library/Python/2.6/site-packages/django/core/mail/backends/smtp.py in open
                                           local_hostname=DNS_NAME.get_fqdn()) ...
▶ Local vars
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py in __init__
            (code, msg) = self.connect(host, port) ...
▶ Local vars
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py in connect
        self.sock = self._get_socket(host, port, self.timeout) ...
▶ Local vars
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py in _get_socket
        return socket.create_connection((port, host), timeout) ...
▶ Local vars
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py in create_connection
    raise error, msg ...
▶ Local vars
Request information

GET
No GET data
POST
Variable    Value
username    
u'ishmeet'
password1   
u'ishmeet'
csrfmiddlewaretoken 
u'8fd9a8a61a20b8f9f4fb46d4742194d8'
email   
u'sahibasiali@rediffmail.com'
password2   
u'ishmeet'
FILES
No FILES data
COOKIES
Variable    Value
csrftoken   
'8fd9a8a61a20b8f9f4fb46d4742194d8'
sessionid   
'e013edcde30c30e3fe91c9c5eb87c35d'
META
Variable    Value
wsgi.multiprocess   
False
RUN_MAIN    
'true'
HTTP_REFERER    
'http://127.0.0.1:8000/accounts/register/'
VERSIONER_PYTHON_PREFER_32_BIT  
'yes'
SERVER_SOFTWARE 
'WSGIServer/0.1 Python/2.6.1'
LC_CTYPE    
'UTF-8'
TERM_PROGRAM_VERSION    
'273'
REQUEST_METHOD  
'POST'
LOGNAME 
'IIC'
USER    
'IIC'
HTTP_ORIGIN 
'http://127.0.0.1:8000'
PATH    
'/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin'
QUERY_STRING    
''
HOME    
'/Users/IIC'
DISPLAY 
'/tmp/launch-vJglmD/org.x:0'
TERM_PROGRAM    
'Apple_Terminal'
CONTENT_LENGTH  
'140'
HTTP_ACCEPT_CHARSET 
'ISO-8859-1,utf-8;q=0.7,*;q=0.3'
TERM    
'xterm-color'
SHELL   
'/bin/bash'
TZ  
'America/Chicago'
HTTP_COOKIE 
'sessionid=e013edcde30c30e3fe91c9c5eb87c35d; csrftoken=8fd9a8a61a20b8f9f4fb46d4742194d8'
SERVER_NAME 
'localhost'
VERSIONER_PYTHON_VERSION    
'2.6'
SHLVL   
'1'
wsgi.url_scheme 
'http'
_   
'/usr/bin/python'
SERVER_PORT 
'8000'
PATH_INFO   
u'/accounts/register/'
SSH_AUTH_SOCK   
'/tmp/launch-yYlUzI/Listeners'
wsgi.input  
<socket._fileobject object at 0x127bd30>
Apple_PubSub_Socket_Render  
'/tmp/launch-ZoPjRJ/Render'
HTTP_HOST   
'127.0.0.1:8000'
SCRIPT_NAME 
u''
wsgi.multithread    
True
HTTP_CONNECTION 
'keep-alive'
HTTP_CACHE_CONTROL  
'max-age=0'
TMPDIR  
'/var/folders/C6/C6KzFAD5EaOwCKtGikDNrU+++TI/-Tmp-/'
HTTP_ACCEPT 
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
wsgi.version    
(1, 0)
HTTP_USER_AGENT 
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30'
GATEWAY_INTERFACE   
'CGI/1.1'
wsgi.run_once   
False
CSRF_COOKIE 
'8fd9a8a61a20b8f9f4fb46d4742194d8'
OLDPWD  
'/Users/IIC'
REMOTE_ADDR 
'127.0.0.1'
HTTP_ACCEPT_LANGUAGE    
'en-US,en;q=0.8'
wsgi.errors 
<open file '<stderr>', mode 'w' at 0x1840c0>
__CF_USER_TEXT_ENCODING 
'0x1F5:0:0'
PWD 
'/Users/IIC/Documents/dr'
SERVER_PROTOCOL 
'HTTP/1.1'
DJANGO_SETTINGS_MODULE  
'dr.settings'
CONTENT_TYPE    
'application/x-www-form-urlencoded'
wsgi.file_wrapper   
''
REMOTE_HOST 
''
HTTP_ACCEPT_ENCODING    
'gzip,deflate,sdch'
COMMAND_MODE    
'unix2003'
Settings
Using settings module dr.settings
Setting Value
USE_L10N    
True
USE_THOUSAND_SEPARATOR  
False
LANGUAGE_CODE   
'en-us'
ROOT_URLCONF    
'dr.urls'
MANAGERS    
()
ACCOUNT_ACTIVATION_DAYS 
7
STATIC_ROOT 
''
TEST_DATABASE_CHARSET   
None
MESSAGE_STORAGE 
'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
DATABASE_HOST   
''
IGNORABLE_404_STARTS    
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
SEND_BROKEN_LINK_EMAILS 
False
URL_VALIDATOR_USER_AGENT    
'Django/1.3 (http://www.djangoproject.com)'
STATICFILES_FINDERS 
('django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder')
SESSION_COOKIE_DOMAIN   
None
SESSION_COOKIE_NAME 
'sessionid'
COMMENTS_MODERATORS_GROUP   
None
TIME_INPUT_FORMATS  
('%H:%M:%S', '%H:%M')
DATABASES   
{'default': {'ENGINE': 'django.db.backends.sqlite3',
             'HOST': '',
             'NAME': '/Users/IIC/Documents/dr/sahiba.db',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST_CHARSET': None,
             'TEST_COLLATION': None,
             'TEST_MIRROR': None,
             'TEST_NAME': None,
             'TIME_ZONE': 'America/Chicago',
             'USER': ''}}
TEST_DATABASE_NAME  
None
FILE_UPLOAD_PERMISSIONS 
None
FILE_UPLOAD_HANDLERS    
('django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler')
DEFAULT_CONTENT_TYPE    
'text/html'
APPEND_SLASH    
True
FIRST_DAY_OF_WEEK   
0
DATABASE_ROUTERS    
[]
YEAR_MONTH_FORMAT   
'F Y'
STATICFILES_STORAGE 
'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES  
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
             'LOCATION': ''}}
SERVER_EMAIL    
'root@localhost'
SESSION_COOKIE_PATH 
'/'
IGNORABLE_404_ENDS  
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
MIDDLEWARE_CLASSES  
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.csrf.CsrfResponseMiddleware')
USE_I18N    
True
THOUSAND_SEPARATOR  
','
SECRET_KEY  
'********************'
LANGUAGE_COOKIE_NAME    
'django_language'
FILE_UPLOAD_TEMP_DIR    
None
TRANSACTIONS_MANAGED    
False
LOGGING_CONFIG  
'django.utils.log.dictConfig'
TEMPLATE_LOADERS    
('django.template.loaders.filesystem.Loader',
 'django.template.loaders.app_directories.Loader')
TEMPLATE_DEBUG  
True
AUTHENTICATION_BACKENDS 
('django.contrib.auth.backends.ModelBackend',)
TEST_DATABASE_COLLATION 
None
FORCE_SCRIPT_NAME   
None
CACHE_BACKEND   
'locmem://'
DEFAULT_CHARSET 
'utf-8'
SESSION_COOKIE_SECURE   
False
CSRF_COOKIE_DOMAIN  
None
FILE_CHARSET    
'utf-8'
DEBUG   
True
SESSION_FILE_PATH   
None
DEFAULT_FILE_STORAGE    
'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS  
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'registration',
 'django.contrib.admin']
LANGUAGES   
(('ar', 'Arabic'),
 ('az', 'Azerbaijani'),
 ('bg', 'Bulgarian'),
 ('bn', 'Bengali'),
 ('bs', 'Bosnian'),
 ('ca', 'Catalan'),
 ('cs', 'Czech'),
 ('cy', 'Welsh'),
 ('da', 'Danish'),
 ('de', 'German'),
 ('el', 'Greek'),
 ('en', 'English'),
 ('en-gb', 'British English'),
 ('es', 'Spanish'),
 ('es-ar', 'Argentinian Spanish'),
 ('es-mx', 'Mexican Spanish'),
 ('es-ni', 'Nicaraguan Spanish'),
 ('et', 'Estonian'),
 ('eu', 'Basque'),
 ('fa', 'Persian'),
 ('fi', 'Finnish'),
 ('fr', 'French'),
 ('fy-nl', 'Frisian'),
 ('ga', 'Irish'),
 ('gl', 'Galician'),
 ('he', 'Hebrew'),
 ('hi', 'Hindi'),
 ('hr', 'Croatian'),
 ('hu', 'Hungarian'),
 ('id', 'Indonesian'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('km', 'Khmer'),
 ('kn', 'Kannada'),
 ('ko', 'Korean'),
 ('lt', 'Lithuanian'),
 ('lv', 'Latvian'),
 ('mk', 'Macedonian'),
 ('ml', 'Malayalam'),
 ('mn', 'Mongolian'),
 ('nl', 'Dutch'),
 ('no', 'Norwegian'),
 ('nb', 'Norwegian Bokmal'),
 ('nn', 'Norwegian Nynorsk'),
 ('pa', 'Punjabi'),
 ('p开发者_StackOverflow社区l', 'Polish'),
 ('pt', 'Portuguese'),
 ('pt-br', 'Brazilian Portuguese'),
 ('ro', 'Romanian'),
 ('ru', 'Russian'),
 ('sk', 'Slovak'),
 ('sl', 'Slovenian'),
 ('sq', 'Albanian'),
 ('sr', 'Serbian'),
 ('sr-latn', 'Serbian Latin'),
 ('sv', 'Swedish'),
 ('ta', 'Tamil'),
 ('te', 'Telugu'),
 ('th', 'Thai'),
 ('tr', 'Turkish'),
 ('uk', 'Ukrainian'),
 ('ur', 'Urdu'),
 ('vi', 'Vietnamese'),
 ('zh-cn', 'Simplified Chinese'),
 ('zh-tw', 'Traditional Chinese'))
DATABASE_ENGINE 
''
DATABASE_NAME   
''
COMMENTS_FIRST_FEW  
0
PREPEND_WWW 
False
SESSION_COOKIE_HTTPONLY 
False
DATABASE_PORT   
''
DEBUG_PROPAGATE_EXCEPTIONS  
False
MONTH_DAY_FORMAT    
'F j'
LOGIN_URL   
'/accounts/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE 
False
TIME_FORMAT 
'P'
DATE_INPUT_FORMATS  
('%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y')
CSRF_COOKIE_NAME    
'csrftoken'
EMAIL_HOST_PASSWORD 
'********************'
PASSWORD_RESET_TIMEOUT_DAYS 
'********************'
CACHE_MIDDLEWARE_ALIAS  
'default'
SESSION_SAVE_EVERY_REQUEST  
False
ADMIN_MEDIA_PREFIX  
'/static/admin/'
NUMBER_GROUPING 
0
SESSION_ENGINE  
'django.contrib.sessions.backends.db'
CSRF_FAILURE_VIEW   
'django.views.csrf.csrf_failure'
COMMENTS_SKETCHY_USERS_GROUP    
None
LOGIN_REDIRECT_URL  
'/'
LOGGING 
{'disable_existing_loggers': False,
 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler',
                              'level': 'ERROR'}},
 'loggers': {'django.request': {'handlers': ['mail_admins'],
                                'level': 'ERROR',
                                'propagate': True}},
 'version': 1}
CACHE_MIDDLEWARE_KEY_PREFIX 
''
LOCALE_PATHS    
()
TEMPLATE_STRING_IF_INVALID  
''
COMMENTS_ALLOW_PROFANITIES  
False
LOGOUT_URL  
'/accounts/logout/'
EMAIL_USE_TLS   
False
TEMPLATE_DIRS   
('/Users/IIC/Desktop/dreg/',)
FIXTURE_DIRS    
()
EMAIL_HOST  
'localhost'
DATE_FORMAT 
'N j, Y'
MEDIA_ROOT  
''
ADMINS  
()
FORMAT_MODULE_PATH  
None
DEFAULT_FROM_EMAIL  
'webmaster@localhost'
STATICFILES_DIRS    
()
MEDIA_URL   
''
DATETIME_FORMAT 
'N j, Y, P'
EMAIL_SUBJECT_PREFIX    
'[Django] '
SITE_ID 
1
DISALLOWED_USER_AGENTS  
()
ALLOWED_INCLUDE_ROOTS   
()
DECIMAL_SEPARATOR   
'.'
SHORT_DATE_FORMAT   
'm/d/Y'
DATABASE_USER   
''
TEST_RUNNER 
'django.test.simple.DjangoTestSuiteRunner'
TIME_ZONE   
'America/Chicago'
FILE_UPLOAD_MAX_MEMORY_SIZE 
2621440
EMAIL_BACKEND   
'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_TABLESPACE  
''
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.contrib.messages.context_processors.messages')
SESSION_COOKIE_AGE  
1209600
SETTINGS_MODULE 
'dr.settings'
USE_ETAGS   
False
LANGUAGES_BIDI  
('he', 'ar', 'fa')
DEFAULT_INDEX_TABLESPACE    
''
INTERNAL_IPS    
()
STATIC_URL  
'/static/'
EMAIL_PORT  
25
SHORT_DATETIME_FORMAT   
'm/d/Y P'
ABSOLUTE_URL_OVERRIDES  
{}
DATABASE_OPTIONS    
{}
CACHE_MIDDLEWARE_SECONDS    
600
BANNED_IPS  
()
DATETIME_INPUT_FORMATS  
('%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M',
 '%Y-%m-%d',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M',
 '%m/%d/%Y',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M',
 '%m/%d/%y')
DATABASE_PASSWORD   
'********************'
ADMIN_FOR   
()
COMMENTS_BANNED_USERS_GROUP 
None
EMAIL_HOST_USER 
''
PROFANITIES_LIST    
'********************'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page. 
0

精彩评论

暂无评论...
验证码 换一张
取 消