oscar.apps.customer.auth_backends.EmailBackend does not define a "EmailBackend"

545 views
Skip to first unread message

Ben Brown

unread,
Jun 11, 2014, 9:23:14 AM6/11/14
to django...@googlegroups.com
I am trying to start a project from scratch and have a few questions I am getting this error oscar.apps.customer.auth_backends.EmailBackend does not define a "EmailBackend" not sure how to fix this it's only occurring when I try to access the backend has anyone had this issue before.

David Winterbottom

unread,
Jun 11, 2014, 9:43:00 AM6/11/14
to django-oscar
Since that class does exist, it sounds like a circular import problem. Now sure how to fix - but I would walk back through the changes you've made from a working version to see where the imports were changed.


On 11 June 2014 14:23, Ben Brown <bobt...@gmail.com> wrote:
I am trying to start a project from scratch and have a few questions I am getting this error oscar.apps.customer.auth_backends.EmailBackend does not define a "EmailBackend" not sure how to fix this it's only occurring when I try to access the backend has anyone had this issue before.

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-oscar/0a2d0494-9939-4daf-bbbc-57aed5fc7321%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
David Winterbottom
Technical Director

Tangent Snowball
84-86 Great Portland Street
London W1W 7NR
England, UK

Ben Brown

unread,
Jun 11, 2014, 10:31:17 AM6/11/14
to django...@googlegroups.com, david.win...@tangentlabs.co.uk
The frontend works it's just the backend all I did was follow the build your own shop and added the location lambda and I am getting this error

David Winterbottom

unread,
Jun 11, 2014, 10:53:58 AM6/11/14
to django-oscar
You need to provide more information for others to be able to help. Please paste a full stack trace of the error along with any other info that might be relevant.



For more options, visit https://groups.google.com/d/optout.

Ben Brown

unread,
Jun 11, 2014, 11:57:18 AM6/11/14
to django...@googlegroups.com, david.win...@tangentlabs.co.uk

Environment:



Request Method: POST

Request URL: http://127.0.0.1:8000/admin/


Django Version: 1.6.1

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.flatpages',

 'django.contrib.admin',

 'south',

 'compressor',

 'oscar',

 'oscar.apps.analytics',

 'oscar.apps.checkout',

 'oscar.apps.address',

 'oscar.apps.shipping',

 'oscar.apps.catalogue',

 'oscar.apps.catalogue.reviews',

 'oscar.apps.partner',

 'oscar.apps.basket',

 'oscar.apps.payment',

 'oscar.apps.offer',

 'oscar.apps.order',

 'oscar.apps.customer',

 'oscar.apps.promotions',

 'oscar.apps.search',

 'oscar.apps.voucher',

 'oscar.apps.wishlists',

 'oscar.apps.dashboard',

 'oscar.apps.dashboard.reports',

 'oscar.apps.dashboard.users',

 'oscar.apps.dashboard.orders',

 'oscar.apps.dashboard.promotions',

 'oscar.apps.dashboard.catalogue',

 'oscar.apps.dashboard.offers',

 'oscar.apps.dashboard.partners',

 'oscar.apps.dashboard.pages',

 'oscar.apps.dashboard.ranges',

 'oscar.apps.dashboard.reviews',

 'oscar.apps.dashboard.vouchers',

 'oscar.apps.dashboard.communications',

 'haystack',

 'treebeard',

 'sorl.thumbnail']

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',

 'oscar.apps.basket.middleware.BasketMiddleware',

 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')



Traceback:

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/db/transaction.py" in inner

  339.                 return func(*args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in wrapper

  215.                 return self.admin_view(view, cacheable)(*args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view

  99.                     response = view_func(request, *args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func

  52.         response = view_func(request, *args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner

  197.                 return self.login(request)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func

  52.         response = view_func(request, *args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in login

  330.         return login(request, **defaults)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper

  75.             return view(request, *args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view

  99.                     response = view_func(request, *args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func

  52.         response = view_func(request, *args, **kwargs)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/auth/views.py" in login

  36.         if form.is_valid():

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/forms/forms.py" in is_valid

  129.         return self.is_bound and not bool(self.errors)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/forms/forms.py" in errors

  121.             self.full_clean()

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/forms/forms.py" in full_clean

  274.         self._clean_form()

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/forms/forms.py" in _clean_form

  300.             self.cleaned_data = self.clean()

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/admin/forms.py" in clean

  28.             self.user_cache = authenticate(username=username, password=password)

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in authenticate

  47.     for backend in get_backends():

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in get_backends

  22.         backends.append(load_backend(backend_path))

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in load_backend

  16.     return import_by_path(path)()

File "/home/ben/Projects/apature-digital/oscar/local/lib/python2.7/site-packages/django/utils/module_loading.py" in import_by_path

  31.             error_prefix, module_path, class_name))


Exception Type: ImproperlyConfigured at /admin/

Exception Value: Module "oscar.apps.customer.auth_backends" does not define a "EmailBackend" attribute/class

Lijo Antony

unread,
Jun 11, 2014, 12:35:52 PM6/11/14
to django-oscar
Hi,

I don't know the exact problem you are facing, but I have had similar issues in the past due to missing email backend. You may try by configuring a console email backend in your settings.py

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

-lijo



Ben Brown

unread,
Jun 11, 2014, 12:49:52 PM6/11/14
to django...@googlegroups.com
Yeah I have one of those after looking at the settings for the sandbox thought it might be important but made no difference. I have been trying an trying to get this to work I know why I didn't like django again now all I need is a good explanation of how it works with oscar. All I am trying to make is a simple digital download site for stock images I have all the HTML designs and the exact idea I need, just having trouble getting started I did have a developer that was going to build my major functionality but haven't been able to get in touch with them and they haven't got back to me with a price. If the guides and documentation was clearer I could do it myself.

Maik Hoepfel

unread,
Jun 11, 2014, 1:23:52 PM6/11/14
to django...@googlegroups.com
Ben,

I'm guessing you're running Oscar 0.7? I renamed the backend in
https://github.com/tangentlabs/django-oscar/commit/d040fee3f18b46cdc374a780478c2686c2076253

Changing the setting to 'oscar.apps.customer.auth_backends.Emailbackend'
(note the lowercase, non-pythonic B in backend) should do the trick.

My change happened after the release of 0.7. I would've expected the
docs for version 0.7
(http://django-oscar.readthedocs.org/en/releases-0.7/internals/getting_started.html)
to specify the old (correct for <0.8) spelling. I'm sorry about that,
that's a problem with how our docs are build and I will look into that.

Regards,

Maik
> <https://github.com/tangentlabs/django-oscar/blob/0.7.1/oscar/apps/customer/auth_backends.py#L17>,
> it sounds like a circular import problem. Now sure
> how to fix - but I would walk back through the
> changes you've made from a working version to see
> where the imports were changed.
>
>
> On 11 June 2014 14:23, Ben Brown <bobt...@gmail.com>
> wrote:
>
> I am trying to start a project from scratch and
> have a few questions I am getting this
> error oscar.apps.customer.__auth___backends.EmailBackend
> does not define a "EmailBackend" not sure how to
> fix this it's only occurring when I try to
> access the backend has anyone had this issue before.
>
> --
> https://github.com/__tangentlabs__/django-oscar
> <https://github.com/tangentlabs/django-oscar>
> http://django-oscar.__readthedoc__s.org/en/latest/
> <http://django-oscar.readthedocs.org/en/latest/>
> https://twitter.com/django___osc__ar
> <https://twitter.com/django_oscar>
> ---
> You received this message because you are
> subscribed to the Google Groups "django-oscar"
> group.
> To unsubscribe from this group and stop
> receiving emails from it, send an email to
> django-oscar...@__googlegroups.__com.
>
> Visit this group at
> http://groups.google.com/__group__/django-oscar
> <http://groups.google.com/group/django-oscar>.
> To view this discussion on the web visit
> https://groups.google.com/d/__ms__gid/django-oscar/0a2d0494-__9939__-4daf-bbbc-57aed5fc7321%__40goog__legroups.com
> <https://groups.google.com/d/msgid/django-oscar/0a2d0494-9939-4daf-bbbc-57aed5fc7321%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
> https://groups.google.com/d/__op__tout
> <https://groups.google.com/d/optout>.
>
>
>
>
> --
> *David Winterbottom*
> Technical Director
>
> Tangent Snowball
> 84-86 Great Portland Street
> London W1W 7NR
> England, UK
>
> --
> https://github.com/__tangentlabs/django-oscar
> <https://github.com/tangentlabs/django-oscar>
> http://django-oscar.__readthedocs.org/en/latest/
> <http://django-oscar.readthedocs.org/en/latest/>
> https://twitter.com/django___oscar
> <https://twitter.com/django_oscar>
> ---
> You received this message because you are subscribed to
> the Google Groups "django-oscar" group.
> To unsubscribe from this group and stop receiving emails
> from it, send an email to
> django-oscar...@__googlegroups.com.
> Visit this group at
> http://groups.google.com/__group/django-oscar
> <http://groups.google.com/group/django-oscar>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/django-oscar/4500367c-__be53-41e9-b7b3-4a51d409f8ec%__40googlegroups.com
> <https://groups.google.com/d/msgid/django-oscar/4500367c-be53-41e9-b7b3-4a51d409f8ec%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> For more options, visit
> https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
>
>
>
> --
> *David Winterbottom*
> Technical Director
>
> Tangent Snowball
> 84-86 Great Portland Street
> London W1W 7NR
> England, UK
>
> --
> https://github.com/tangentlabs/django-oscar
> <https://github.com/tangentlabs/django-oscar>
> http://django-oscar.readthedocs.org/en/latest/
> <http://django-oscar.readthedocs.org/en/latest/>
> https://twitter.com/django_oscar <https://twitter.com/django_oscar>
> ---
> You received this message because you are subscribed to the
> Google Groups "django-oscar" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to django-oscar...@googlegroups.com <javascript:>.
> <http://groups.google.com/group/django-oscar>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-oscar/40da397c-1b23-4a7d-9d0a-b5edccbf9100%40googlegroups.com
> <https://groups.google.com/d/msgid/django-oscar/40da397c-1b23-4a7d-9d0a-b5edccbf9100%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> https://github.com/tangentlabs/django-oscar
> http://django-oscar.readthedocs.org/en/latest/
> https://twitter.com/django_oscar
> ---
> You received this message because you are subscribed to the Google
> Groups "django-oscar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-oscar...@googlegroups.com
> <mailto:django-oscar...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/django-oscar.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-oscar/c667c4e9-d7f0-409e-9665-ca23d405cc54%40googlegroups.com
> <https://groups.google.com/d/msgid/django-oscar/c667c4e9-d7f0-409e-9665-ca23d405cc54%40googlegroups.com?utm_medium=email&utm_source=footer>.

Ben Brown

unread,
Jun 11, 2014, 1:57:37 PM6/11/14
to django...@googlegroups.com
Yes that worked thanks for that i'll bear that in mind next time I have a similar issue.
Reply all
Reply to author
Forward
0 new messages