ConnectionError in Djrill after upgrading to Mac OSX 10.10.5 - django

I just upgraded to Mac OSX 10.10.5 today and now I get a ConnectionError every time I try to send an email locally in GAE using the djrill Django app.
Exception Type: ConnectionError
Exception Value: ('Connection aborted.', error(22, 'Invalid argument'))
I've received this error prior to 10.10.5, but included the following code at the top of my views.py as a workaround.
import imp
import os.path
from google.appengine.tools.devappserver2.python import sandbox
sandbox._WHITE_LIST_C_MODULES += ['_ssl', '_socket']
# Use the system socket.
psocket = os.path.join(os.path.dirname(os.__file__), 'socket.py')
imp.load_source('socket', psocket)
But now if I attempt to execute the following block of code after upgrading to 10.10.5, I encounter the error.
msg = EmailMultiAlternatives(
to=['user#domain.com'],
subject='TEST',
from_email='Admin <admin#projectname.appspotmail.com>',
)
msg.template_name = "template-name"
msg.send()
Here's the full traceback:
Request Method: GET
Request URL: http://localhost:16080/
Django Version: 1.4.13
Python Version: 2.7.10
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'<projectapp>',
'djrill')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/core/handlers/base.py" in get_response
109. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/<username>/<projectname>/order_manager/views.py" in _decorated
53. return view_func(request)
File "/Users/<username>/<projectname>/order_manager/views.py" in select_job
102. msg.send()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django-1.4/django/core/mail/message.py" in send
248. return self.get_connection(fail_silently).send_messages([self])
File "/Users/<username>/<projectname>/djrill/mail/backends/djrill.py" in send_messages
68. sent = self._send(message)
File "/Users/<username>/<projectname>/djrill/mail/backends/djrill.py" in _send
107. response = requests.post(api_url, data=json.dumps(api_params, cls=JSONDateUTCEncoder))
File "/Users/<username>/<projectname>/requests/api.py" in post
109. return request('post', url, data=data, json=json, **kwargs)
File "/Users/<username>/<projectname>/requests/api.py" in request
50. response = session.request(method=method, url=url, **kwargs)
File "/Users/<username>/<projectname>/requests/sessions.py" in request
470. resp = self.send(prep, **send_kwargs)
File "/Users/<username>/<projectname>/requests/sessions.py" in send
578. r = adapter.send(request, **kwargs)
File "/Users/<username>/<projectname>/requests/adapters.py" in send
410. raise ConnectionError(err, request=request)
Exception Type: ConnectionError at /
Exception Value: ('Connection aborted.', error(22, 'Invalid argument'))
I appreciate any advice on how to once again send emails from my GAE local server using djrill after upgrading to OSX 10.10.5. Thanks!

I was troubleshooting a seemingly unrelated issue and stumbled across a suitable workaround. I replaced the latest version of the python requests module in my App Engine project with version 2.3.

Related

How generate a pdf file with django-wkhtmltopdf on IIS 7.5 - 8

I use django-wkhtmltopdf to generate pdfs in my webapp, Works fine using the django integrate server, but when I use IIS 7.5 or 8 gives me this error: WindowsError [Error 6] The handle is invalid
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8006/blabla/pdf/10/
Django Version: 1.8.5
Python Version: 2.7.10
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'NuevoTicket',
'crispy_forms',
'wkhtmltopdf',
'ckeditor',
'ckeditor_uploader')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
164. response = response.render()
File "C:\Python27\lib\site-packages\django\template\response.py" in render
158. self.content = self.rendered_content
File "C:\Python27\lib\site-packages\wkhtmltopdf\views.py" in rendered_content
78. cmd_options=cmd_options
File "C:\Python27\lib\site-packages\wkhtmltopdf\utils.py" in render_pdf_from_template
159. cmd_options=cmd_options)
File "C:\Python27\lib\site-packages\wkhtmltopdf\utils.py" in convert_to_pdf
121. return wkhtmltopdf(pages=[filename], **cmd_options)
File "C:\Python27\lib\site-packages\wkhtmltopdf\utils.py" in wkhtmltopdf
109. return check_output(ck_args, **ck_kwargs)
File "C:\Python27\lib\subprocess.py" in check_output
566. process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py" in __init__
702. errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
File "C:\Python27\lib\subprocess.py" in _get_handles
857. errwrite = _subprocess.GetStdHandle(_subprocess.STD_ERROR_HANDLE)
Exception Type: WindowsError at /blabla/pdf/10/
Exception Value: 6 The handle is invalid
Finally got it, thank's to n1b0r. I have to update the check_out method in python27/lib/subprocess.py like this
from:
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = Popen(stdout=PIPE, *popenargs, **kwargs)
to:
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
kwargs.pop('stderr', None)
process = Popen(stdout=PIPE, stderr=PIPE, stdin=PIPE, *popenargs, **kwargs)
That make it works in IIS but gives an error if use the django integrate server.
I used to have the same problem. Add the option quiet to the pdfkit and also try to modify the file configuration.py from pdfkit
options = {'quiet': ''}
pdfkit.from_file('in.html', 'out.pdf',options = options)
configuration.py
from this:
self.wkhtmltopdf = subprocess.Popen(['where','wkhtmltopdf'],stdout=subprocess.PIPE).communicate()[0].strip()
to:
self.wkhtmltopdf = subprocess.Popen(['which','wkhtmltopdf'],stdin=subprocess.PIPE,stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0].strip()

Django registration [Errno 10013] error

so for some reason this error([Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions), keeps occurring. when i try to use registration in Django. I am using windows 7 and pycharm IDE with django 1.65. I have already tried different ports to run server (8001 & 8008) and also adding permission in windows firewall and kasperesky firewall for python.exe and pycharm. Any suggestion.
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8001/accounts/register/
Django Version: 1.6.5
Python Version: 2.7.8
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'profiles',
'south',
'registration',
'PIL',
'stripe')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\core\handlers\base.py" in get_response
112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\views\generic\base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\registration\views.py" in dispatch
79. return super(RegistrationView, self).dispatch(request, *args, **kwargs)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\views\generic\base.py" in dispatch
87. return handler(request, *args, **kwargs)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\registration\views.py" in post
35. return self.form_valid(request, form)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\registration\views.py" in form_valid
82. new_user = self.register(request, **form.cleaned_data)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\registration\backends\default\views.py" in register
80. password, site)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\db\transaction.py" in inner
431. return func(*args, **kwargs)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\registration\models.py" in create_inactive_user
91. registration_profile.send_activation_email(site)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\registration\models.py" in send_activation_email
270. self.user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\contrib\auth\models.py" in email_user
413. send_mail(subject, message, from_email, [self.email])
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\core\mail\__init__.py" in send_mail
50. connection=connection).send()
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\core\mail\message.py" in send
274. return self.get_connection(fail_silently).send_messages([self])
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\core\mail\backends\smtp.py" in send_messages
87. new_conn_created = self.open()
File "C:\Users\jasan\Virtual_enviornments\virtual_env_matchmaker\lib\site-packages\django\core\mail\backends\smtp.py" in open
48. local_hostname=DNS_NAME.get_fqdn())
File "C:\Python27\Lib\smtplib.py" in __init__
251. (code, msg) = self.connect(host, port)
File "C:\Python27\Lib\smtplib.py" in connect
311. self.sock = self._get_socket(host, port, self.timeout)
File "C:\Python27\Lib\smtplib.py" in _get_socket
286. return socket.create_connection((host, port), timeout)
File "C:\Python27\Lib\socket.py" in create_connection
571. raise err
Exception Type: error at /accounts/register/
Exception Value: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions
The problem has to do with your email server setup. Instead of figuring out what to fix, just set your EMAIL_BACKEND in settings.py to the following:
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
This way, any email sent by django will be shown in the console instead of attempting delivery. You can then continue developing your application.
Having emails printed on the console is good if you are developing, but it can be a headache if your application is sending a lot of emails across.
A better solution is to install mailcatcher. This application will create a local mail server for testing and as a bonus, provide you a web interface where you can view the emails being sent by your server:
It is a Ruby application, and as you are on Windows, I would suggest using rubyinstaller to help with gem installation.
The website also shows you how to configure django:
if DEBUG:
EMAIL_HOST = '127.0.0.1'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 1025
EMAIL_USE_TLS = False
This has nothing to do with your webserver ports, this is to do with the host and port that smtplib is trying to open in order to send an email.
These are controlled by settings.EMAIL_HOST and settings.EMAIL_PORT. There are other settings too, see the documentation for details on how to set up email properly.

Permission denied error while trying to register and email to user on website using django 1.6 + django-allauth on CentOS 6.5 + httpd webserver

I am running Django 1.6 framework on CentOS 6.5 (AWS EC2 instance) and serving the website using httpd web server. I am using django-allauth package for user account signup. When one signs up, allauth sends an outbound email to the user and then the user has to confirm their email address by clicking on a link in the email. Here are the corresponding SMTP settings in settings.py:
# smtp server settings for gmail
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'myusername#gmail.com'
EMAIL_HOST_PASSWORD = '<mypassword>'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
On my development server (which is also a CentOS 6.5 on a Virtualbox on my Windows laptop), on which I just run the Django based webserver (using python manage.py runserver), all is well i.e. When I do a registration, it is able to send an outbound email and I am able to successfully register and login subsequently.
But on the test server (AWS EC2 instance running CentOS 6.5 using httpd and using Django 1.6 on it), when I try to register, it ends up in the page throwing a "Permission denied" error, the details of the stack trace which I am pasting below.
error at /accounts/signup/
[Errno 13] Permission denied
Request Method: POST
Request URL: http://<server_ip_address>/accounts/signup/
Django Version: 1.6.2
Exception Type: error
Exception Value:
[Errno 13] Permission denied
Exception Location: /usr/lib64/python2.6/socket.py in create_connection, line 567
Python Executable: /usr/bin/python
Python Version: 2.6.6
Python Path:
['/var/www/html/firstProject',
'/usr/lib64/python26.zip',
'/usr/lib64/python2.6',
'/usr/lib64/python2.6/plat-linux2',
'/usr/lib64/python2.6/lib-tk',
'/usr/lib64/python2.6/lib-old',
'/usr/lib64/python2.6/lib-dynload',
'/usr/lib64/python2.6/site-packages',
'/usr/lib/python2.6/site-packages']
Request Method: POST
Request URL: http://<server_ip_address>/accounts/signup/
Django Version: 1.6.2
Python Version: 2.6.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'print_string',
'CompanyApp',
'UserApp',
'south',
'allauth',
'allauth.account',
'allauth.socialaccount',
'sendgrid',
'django_cleanup')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.6/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/allauth/account/views.py" in dispatch
62. **kwargs)
File "/usr/lib/python2.6/site-packages/allauth/account/views.py" in dispatch
133. **kwargs)
File "/usr/lib/python2.6/site-packages/django/views/generic/base.py" in dispatch
87. return handler(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/allauth/account/views.py" in post
78. response = self.form_valid(form)
File "/usr/lib/python2.6/site-packages/allauth/account/views.py" in form_valid
164. self.get_success_url())
File "/usr/lib/python2.6/site-packages/allauth/account/utils.py" in complete_signup
149. signal_kwargs=signal_kwargs)
File "/usr/lib/python2.6/site-packages/allauth/account/utils.py" in perform_login
117. send_email_confirmation(request, user, signup=signup)
File "/usr/lib/python2.6/site-packages/allauth/account/utils.py" in send_email_confirmation
278. signup=signup)
File "/usr/lib/python2.6/site-packages/allauth/account/models.py" in send_confirmation
56. confirmation.send(request, signup=signup)
File "/usr/lib/python2.6/site-packages/allauth/account/models.py" in send
131. ctx)
File "/usr/lib/python2.6/site-packages/allauth/account/adapter.py" in send_mail
93. msg.send()
File "/usr/lib/python2.6/site-packages/django/core/mail/message.py" in send
274. return self.get_connection(fail_silently).send_messages([self])
File "/usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py" in send_messages
87. new_conn_created = self.open()
File "/usr/lib/python2.6/site-packages/django/core/mail/backends/smtp.py" in open
48. local_hostname=DNS_NAME.get_fqdn())
File "/usr/lib64/python2.6/smtplib.py" in __init__
239. (code, msg) = self.connect(host, port)
File "/usr/lib64/python2.6/smtplib.py" in connect
295. self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib64/python2.6/smtplib.py" in _get_socket
273. return socket.create_connection((port, host), timeout)
File "/usr/lib64/python2.6/socket.py" in create_connection
567. raise error, msg
Exception Type: error at /accounts/signup/
Exception Value: [Errno 13] Permission denied
I am splitting my hair on why on my dev environment (Django on CentOS 6.5 running Django test web server + django-allauth) it works fine, whereas on the AWS EC2 instance running CentOS 6.5 + Django 1.6 + httpd + django-allauth, it ends up in this error. Has the root cause of this error do with the server's inability to send outbound emails? Or is it something else that is the root cause?
Any insights on how to resolve this issue and keep moving forward? I am open for change (including the OS if needed). But any resolution that would need the least changes would be helpful.
Thanks.

Getting 403 Forbidden when using Oauth2.0

I am using "Oauth2.0" to access YouTube data API.
the site is hosted on a Django platform, its address is http://listplay1.pythonanywhere.com/
Every time I'd like to authorize myself I refresh the access token and use the new one to get access.
Most of the time it works flawlessly but sometimes I get 403 Forbidden error. when I do the same from the terminal on my pc it works always
Can anyone have an idea in regards to how is it happening only part of the time and more importantly, how to fix it?
Thanks a mill in advance,
*the $$$ parts are hidden on purpose of course.
def auth():
h={'Host':'accounts.google.com','Content-Type':'application/x-www-form-urlencoded','X-GData-Key':'key=$$$'}
content={'client_id':'567194806765-r1pdllkji4tpgv1dc0a9ihrvh0hocoik.apps.googleusercontent.com','client_secret':'$$$','refresh_token':'$$$','grant_type':'refresh_token'}
p=urllib.urlencode(content)
r = requests.post('https://accounts.google.com/o/oauth2/token', data=p,headers=h)
token=r.json().values()[0]
credentials = AccessTokenCredentials(token,'my-user-agent/1.0')
return build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION,http=credentials.authorize(httplib2.Http()))
and the error
Environment:
Request Method: GET
Request URL: http://listplay1.pythonanywhere.com/thanks/
Django Version: 1.3.7
Python Version: 2.7.5
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'main.myapp']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "./main/myapp/views.py" in thanks
64. Pid=create_playlist(YT="",title=TITLE)
File "/home/LISTPLAY1/LISTPLAY/listplay.py" in create_playlist
261. YT=auth()
File "/home/LISTPLAY1/LISTPLAY/listplay.py" in auth
257. return build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION,http=credentials.authorize(httplib2.Http()))
File "/home/LISTPLAY1/LISTPLAY/oauth2client/util.py" in positional_wrapper
132. return wrapped(*args, **kwargs)
File "/home/LISTPLAY1/LISTPLAY/apiclient/discovery.py" in build
192. resp, content = http.request(requested_url)
File "/home/LISTPLAY1/LISTPLAY/oauth2client/util.py" in positional_wrapper
132. return wrapped(*args, **kwargs)
File "/home/LISTPLAY1/LISTPLAY/oauth2client/client.py" in new_request
490. redirections, connection_type)
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py" in request
1570. (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py" in _request
1317. (response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py" in _conn_request
1252. conn.connect()
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py" in connect
1018. sock.connect((self.host, self.port))
File "/usr/local/lib/python2.7/dist-packages/httplib2/socks.py" in connect
424. self.__negotiatehttp(destpair[0], destpair[1])
File "/usr/local/lib/python2.7/dist-packages/httplib2/socks.py" in __negotiatehttp
390. raise HTTPError((statuscode, statusline[2]))
Exception Type: HTTPError at /thanks/
Exception Value: (403, 'Forbidden')

ViewDoesNotExist at /accounts/register/ (django-registration-me error)

I am currently working on a project which uses mongoengine and django. I am using django-registration-me to handle user registrations, but I am having problems after submitting the new user registration form.
The error I am receiving is:
"ViewDoesNotExist at /accounts/register/" "Tried settings in module
core.views. Error was: 'module' object has no attribute 'settings'"
It sends a verification email out fine though. I am new to django and mongoengine, so any help with this would be greatly appreciated.
The traceback is below.
Environment:
Request Method: POST Request URL:
http://dev.teamfit.us:8000/accounts/register/
Django Version: 1.3 beta 1 SVN-15207
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'registration']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File
"/usr/src/django-trunk/django/core/handlers/base.py"
in get_response
111. response = callback(request,
*callback_args, **callback_kwargs)
File
"/usr/local/lib/python2.6/dist-packages/django_registration_me-0.7-py2.6.egg/registration/views.py"
in register
153. return HttpResponseRedirect(success_url or
reverse('registration_complete'))
File
"/usr/src/django-trunk/django/core/urlresolvers.py"
in reverse
390. *args, **kwargs)))
File
"/usr/src/django-trunk/django/core/urlresolvers.py"
in reverse
311. possibilities = self.reverse_dict.getlist(lookup_view)
File
"/usr/src/django-trunk/django/core/urlresolvers.py"
in _get_reverse_dict
228. self._populate()
File
"/usr/src/django-trunk/django/core/urlresolvers.py"
in _populate
219. lookups.appendlist(pattern.callback,
(bits, p_pattern))
File
"/usr/src/django-trunk/django/core/urlresolvers.py"
in _get_callback
169. raise ViewDoesNotExist("Tried %s in module
%s. Error was: %s" % (func_name,
mod_name, str(e)))
Exception Type: ViewDoesNotExist at
/accounts/register/
Exception Value: Tried settings in
module core.views. Error was: 'module'
object has no attribute 'settings'
I guess, you have
import settings
or some such variation in your code.
You should change it to:
from django.conf import settings
and it should work