Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error importing middleware django_facebook #13

Open
windmaple opened this issue Feb 26, 2014 · 1 comment
Open

Error importing middleware django_facebook #13

windmaple opened this issue Feb 26, 2014 · 1 comment

Comments

@windmaple
Copy link

I used pip to install django-facebook. I have the following settings:

MIDDLEWARE_CLASSES = (
'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',
'django_facebook.middleware.FacebookMiddleware',
):

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'south',
'feeds',
'login_feeds',
'readhistory',
'django_facebook',
)

I get this error when running the server:

ImproperlyConfigured: Module "django_facebook.middleware" does not define a "FacebookMiddleware" attribute/class

I also tried in shell:

windmaple@windmaple-VirtualBox:~/git/master$ ./manage.py shell
No handlers could be found for logger "django_facebook.models"
Python 2.7.5+ (default, Sep 19 2013, 13:49:51)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

from django_facebook import middleware
middleware.FacebookMiddleware
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'FacebookMiddleware'

What am I doing wrong?

@asokakkos
Copy link

@mindmapple

Use "django_facebook.middleware.FacebookCanvasMiddleWare" under MIDDLEWARE_CLASSES. I hope this will help you :)

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants