Skip to content
Browse files

Various fixes based on linting with flake8.

  • Loading branch information...
2 parents 2827b95 + 09c11f6 commit 72e5f81edb2ebce3f04a1385b5a0331021b60d83 @martey martey committed Oct 18, 2013
Showing with 2 additions and 8 deletions.
  1. +0 −1 django_facebook/auth.py
  2. +0 −4 django_facebook/decorators.py
  3. +2 −3 django_facebook/templatetags/facebook.py
View
1 django_facebook/auth.py
@@ -1,4 +1,3 @@
-from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.backends import ModelBackend
import facebook
View
4 django_facebook/decorators.py
@@ -23,8 +23,6 @@ def _dec(view_func):
def _view(request, *args, **kwargs):
# Make sure we're receiving a signed_request from facebook
if not request.POST.get('signed_request'):
- from django.conf import settings
-
if hasattr(settings, 'FACEBOOK_RAISE_SR_EXCEPTIONS') \
and settings.FACEBOOK_RAISE_SR_EXCEPTIONS:
raise MissingSignedRequestException(
@@ -80,8 +78,6 @@ def facebook_required(function=None, redirect_field_name=REDIRECT_FIELD_NAME):
def _passes_test(test_func, login_url=None,
redirect_field_name=REDIRECT_FIELD_NAME):
if not login_url:
- from django.conf import settings
-
login_url = settings.LOGIN_URL
def decorator(view_func):
View
5 django_facebook/templatetags/facebook.py
@@ -21,9 +21,8 @@ def __init__(self, nodelist):
try:
app_id = settings.FACEBOOK_APP_ID
except AttributeError:
- raise template.TemplateSyntaxError, "%r tag requires " \
- "FACEBOOK_APP_ID to be configured." \
- % token.contents.split()[0]
+ raise template.TemplateSyntaxError(
+ "facebook_init tag requires FACEBOOK_APP_ID.")
self.app_id = app_id
self.nodelist = nodelist

0 comments on commit 72e5f81

Please sign in to comment.
Something went wrong with that request. Please try again.