added user_id to user-details logging and changes the formatting for resource and user logging.
@@ -122,19 +122,20 @@ class Command(BaseCommand):
'user type',
'organization',
'last login',
+ 'user id',
]
w.writerow(fields)
-
for up in UserProfile.objects.filter(user__is_active=True):
last_login = up.user.last_login.strftime('%m/%d/%Y') if up.user.last_login else ""
values = [
- up.user.date_joined.strftime('%m/%d/%Y'),
+ up.user.date_joined.strftime('%m/%d/%Y %H:%M:%S.%f'),
up.user.first_name,
up.user.last_name,
up.user.email,
up.user_type,
up.organization,
last_login,
+ up.user_id,
]
w.writerow([unicode(v).encode("utf-8") for v in values])
@@ -153,7 +154,7 @@ class Command(BaseCommand):
for r in BaseResource.objects.all():
values = [
- r.metadata.dates.get(type="created").start_date.strftime("%m/%d/%Y"),
+ r.metadata.dates.get(type="created").start_date.strftime("%m/%d/%Y %H:%M:%S.%f"),
r.metadata.title.value,
r.resource_type,
r.size,
