Browse files

pep8

  • Loading branch information...
1 parent 93434c5 commit 6702df1748ede600eb6ab61925120221f7c26cf2 @goinnn goinnn committed Dec 3, 2011
Showing with 5 additions and 4 deletions.
  1. +4 −3 src/django_su/forms.py
  2. +1 −1 src/django_su/templatetags/su_tags.py
View
7 src/django_su/forms.py
@@ -14,14 +14,15 @@ class UserSuForm(forms.Form):
def __init__(self, *args, **kwargs):
super(UserSuForm, self).__init__(*args, **kwargs)
self.need_jquery = False
- if 'ajax_select' in settings.INSTALLED_APPS and getattr(settings, 'AJAX_LOOKUP_CHANNELS'):
+ if 'ajax_select' in settings.INSTALLED_APPS and \
+ getattr(settings, 'AJAX_LOOKUP_CHANNELS', None):
django_su_lookup = settings.AJAX_LOOKUP_CHANNELS.get('django_su', )
if django_su_lookup:
from ajax_select.fields import AutoCompleteSelectField
old_field = self.fields['user']
self.fields['user'] = AutoCompleteSelectField('django_su',
- required=old_field.required,
- label=old_field.label)
+ required=old_field.required,
+ label=old_field.label)
self.need_jquery = True
def get_user(self):
View
2 src/django_su/templatetags/su_tags.py
@@ -6,4 +6,4 @@
@register.inclusion_tag('su/login_link.html', takes_context=True)
def login_su_link(context, user):
- return {'can_su_login': can_su_login(user)}
+ return {'can_su_login': can_su_login(user)}

0 comments on commit 6702df1

Please sign in to comment.