Closed dkbast closed 6 years ago
Hi @dkbast! Please check Demo project here: https://github.com/inoks/django-classified/tree/master/demo . It has user registration via Email/Password and Facebook!
The settings for the demo seem to be missing - which file should I link to? @inoks when I call "python ./manage.py migrate"
Traceback (most recent call last):
File "./manage.py", line 10, in
@dkbast Demo app is inside demo/demo_classified
folder.
I added exact steps in the docs, please take a look: https://github.com/inoks/django-classified/tree/master/demo#django-classified-demo-project
I also fixed some bugs, so you better to update your local copy now.
@inoks Thanks for the update! Im now able to run the demo but I cannot create new users. It seems to be for existing users only - the database is also empty. When I try to login with random credentials I get the following error:
ConnectionRefusedError at /social/complete/email/
Environment:
Request Method: POST
Request URL: http://localhost:8000/social/complete/email/
Django Version: 2.0.7
Python Version: 3.6.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.humanize',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.sitemaps',
'django.contrib.sites',
'django.contrib.staticfiles',
'bootstrapform',
'sorl.thumbnail',
'django_classified',
'social_django',
'demo']
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 "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_django/utils.py" in wrapper
49. return func(request, backend, *args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_django/views.py" in complete
33. *args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/actions.py" in do_complete
41. user = backend.complete(user=user, *args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/backends/base.py" in complete
40. return self.auth_complete(*args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/backends/legacy.py" in auth_complete
25. return self.strategy.authenticate(*args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_django/strategy.py" in authenticate
107. return authenticate(*args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in authenticate
70. user = _authenticate_with_backend(backend, backend_path, request, credentials)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in _authenticate_with_backend
116. return backend.authenticate(*args, **credentials)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/backends/base.py" in authenticate
80. return self.pipeline(pipeline, *args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/backends/base.py" in pipeline
83. out = self.run_pipeline(pipeline, pipeline_index, *args, **kwargs)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/backends/base.py" in run_pipeline
113. result = func(*args, **out) or {}
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/pipeline/partial.py" in wrapper
32. *args, **kwargs) or {}
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/pipeline/mail.py" in mail_validation
22. current_partial.token)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/social_core/strategy.py" in send_email_validation
133. send_email(self, backend, code, partial_token)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/demo_classified/demo/mail.py" in send_validation
14. settings.EMAIL_FROM, [code.email], fail_silently=False)
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/mail/__init__.py" in send_mail
60. return mail.send()
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/mail/message.py" in send
294. return self.get_connection(fail_silently).send_messages([self])
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/mail/backends/smtp.py" in send_messages
103. new_conn_created = self.open()
File "/Users/dkbast/src/github.com/inoks/django-classified/demo/lib/python3.6/site-packages/django/core/mail/backends/smtp.py" in open
63. self.connection = self.connection_class(self.host, self.port, **connection_params)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py" in __init__
251. (code, msg) = self.connect(host, port)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py" in connect
336. self.sock = self._get_socket(host, port, self.timeout)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py" in _get_socket
307. self.source_address)
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py" in create_connection
724. raise err
File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py" in create_connection
713. sock.connect(sa)
Exception Type: ConnectionRefusedError at /social/complete/email/
Exception Value: [Errno 61] Connection refused
@dkbast You should add your email server configuration in to the settings.py
https://docs.djangoproject.com/en/2.0/ref/settings/#std:setting-EMAIL_BACKEND
BTW, I updated demo project to use console Email Backend for the demo - that mean, each time you send email from Django-Classified demo project it will be output in the terminal, instead of actually being send.
@dkbast BTW, I eventually moved Demo project to the separate repo: https://github.com/inoks/django-classified-demo
Hi, this project is amazing! I would love to see this project grow - how can I create new login methods like eMail and password?