Browse Source
Added admin command to scan personal history (#58)
Added admin command to scan personal history (#58)
Reverted exported history file to exclude timestamp. Simplified logging for scanning user history.master
Kevin Mok
6 years ago
6 changed files with 24 additions and 60 deletions
-
1.gitignore
-
10api/management/commands/update-history.py
-
11api/utils.py
-
54api/views.py
-
5graphs/views.py
-
1update-history.sh
@ -0,0 +1,10 @@ |
|||
from django.core.management.base import BaseCommand, CommandError |
|||
from api.utils import parse_history |
|||
from login.models import User |
|||
|
|||
class Command(BaseCommand): |
|||
help = 'Update history for users who requested it' |
|||
|
|||
def handle(self, *args, **options): |
|||
user_id = "polarbier" |
|||
parse_history(User.objects.get(id=user_id).secret) |
@ -0,0 +1 @@ |
|||
/home/kevin/coding/spotify-lib-vis/bin/python /home/kevin/coding/spotify-lib-vis/src/manage.py update-history >> /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log |
Write
Preview
Loading…
Cancel
Save
Reference in new issue