Commit 11020cf1 by stv

Fix Pylint: C0103: (invalid-name)

Command.handle: Invalid name "d" for type variable
(should match [a-z_][a-z0-9_]{2,30}$)
parent 0d2754d8
...@@ -11,23 +11,21 @@ class Command(BaseCommand): ...@@ -11,23 +11,21 @@ class Command(BaseCommand):
Pass a single filename.""" Pass a single filename."""
def handle(self, *args, **options): def handle(self, *args, **options):
f = open(args[0], 'w') file_output = open(args[0], 'w')
#text = open(args[0]).read()
#subject = open(args[1]).read()
users = User.objects.all() users = User.objects.all()
l = [] data_list = []
for user in users: for user in users:
up = UserProfile.objects.get(user=user) profile = UserProfile.objects.get(user=user)
d = { data = {
'username': user.username, 'username': user.username,
'email': user.email, 'email': user.email,
'is_active': user.is_active, 'is_active': user.is_active,
'joined': user.date_joined.isoformat(), 'joined': user.date_joined.isoformat(),
'name': up.name, 'name': profile.name,
'language': up.language, 'language': profile.language,
'location': up.location, 'location': profile.location,
} }
l.append(d) data_list.append(data)
json.dump(l, f) json.dump(data_list, file_output)
f.close() file_output.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment