1. Waldemar Kornewald
  2. djangotoolbox

Commits

d3f3nd3r  committed 5636d15

remove unused imports

  • Participants
  • Parent commits 97dea6e
  • Branches default

Comments (0)

Files changed (2)

File djangotoolbox/admin.py

View file
 from django import forms
 from django.contrib import admin
-from django.contrib.auth.admin import UserAdmin, GroupAdmin
+from django.contrib.auth.admin import UserAdmin
 from django.contrib.auth.models import User, Group, Permission
 
-from djangotoolbox.auth.utils import update_permissions_user, update_user_groups, update_permissions_group
-from djangotoolbox.auth.models import UserPermissionList, GroupList, GroupPermissionList
+from djangotoolbox.auth.utils import update_permissions_user,\
+     update_user_groups, update_permissions_group
+from djangotoolbox.auth.models import UserPermissionList, GroupList, \
+     GroupPermissionList
 
 
 class UserForm(forms.ModelForm):
             choices.append([group_obj.id, group_obj.name])
         self.fields['groups'].choices = choices
 
-
         try:
             user_perm_list = UserPermissionList.objects.get(user=kwargs['instance'])
             self.fields['permissions'].initial = user_perm_list.fk_list
         except (GroupList.DoesNotExist, KeyError):
             self.fields['groups'].initial = list()
                                     
-        
-        
     class Meta:
         model = User
         fields = ('username', 'email', 'first_name', 'last_name', 'is_active',

File djangotoolbox/auth/backends.py

View file
 except NameError:
     from sets import Set as set # Python 2.3 fallback
 
-from django.db import connection
 from django.contrib.auth.backends import ModelBackend
-from django.contrib.auth.models import User, Permission, Group
-from django.contrib.contenttypes.models import ContentType
+from django.contrib.auth.models import User
 
 from djangotoolbox.auth.models import UserPermissionList, GroupPermissionList, GroupList