Setup django_tables2 for user history table
This commit is contained in:
@@ -102,7 +102,7 @@ class History(models.Model):
|
||||
track = models.ForeignKey(Track, on_delete=models.CASCADE)
|
||||
|
||||
def __str__(self):
|
||||
return (self.user, self.time, self.track)
|
||||
return " - ".join((str(self.user), str(self.timestamp), str(self.track)))
|
||||
|
||||
# }}} #
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ from dateutil.parser import parse
|
||||
|
||||
# }}} imports #
|
||||
|
||||
# constants {{{ #
|
||||
|
||||
USER_TRACKS_LIMIT = 50
|
||||
HISTORY_LIMIT = 50
|
||||
ARTIST_LIMIT = 50
|
||||
@@ -31,6 +33,8 @@ HISTORY_ENDPOINT = 'https://api.spotify.com/v1/me/player/recently-played'
|
||||
console_logging = True
|
||||
# console_logging = False
|
||||
|
||||
# }}} constants #
|
||||
|
||||
# parse_library {{{ #
|
||||
|
||||
def parse_library(request, user_secret):
|
||||
|
||||
Reference in New Issue
Block a user