In [1]:
from IPython.display import display, Image, HTML
In [2]:
djangomelb = TwitterUser.objects.get(screen_name='mbylstra')
for tweet in djangomelb.tweets.all()[:5]:
display(tweet)
In [3]:
djangocon = TwitterUser.objects.get(screen_name='DjangoConAU')
for tweet in djangocon.tweets.all().order_by('-retweet_count')[:5]:
display(tweet)
In [4]:
devops_borat = TwitterUser.objects.get(screen_name='DEVOPS_BORAT')
for tweet in devops_borat.tweets.all(wham_pages='all').order_by('-retweet_count')[:5]:
display(tweet)
In [ ]:
for artist in SpotifyArtist.objects.filter(name__icontains='django')[:10]:
print artist.name
In [ ]:
artist = SpotifyArtist.objects.filter(name__icontains='radiohead')[0]
for album in artist.albums.all().order_by('-popularity')[:20]:
print 'popularity: ', album.popularity, ' album:', album.name
In [ ]:
artist = SpotifyArtist.objects.filter(name__icontains='radiohead')[0]
for album in artist.albums.all(wham_depth=2).order_by('-popularity')[:20]:
print 'popularity: ', album.popularity, ' album:', album.name
In [ ]:
Tweet.objects
In [ ]:
SpotifyAlbum.objects
In [ ]: