Skip to content

Instantly share code, notes, and snippets.

@converge
Created May 28, 2018 23:32
Show Gist options
  • Save converge/5727ca58502e82b09995c5884840900b to your computer and use it in GitHub Desktop.
Save converge/5727ca58502e82b09995c5884840900b to your computer and use it in GitHub Desktop.
class AccountsStatisticsDetail(TemplateView):
template_name = 'grow/accountsstatistics.html'
def get_context_data(self, **kwargs):
try:
context = super().get_context_data(**kwargs)
context['username'] = self.kwargs['username']
user = InstagramAccount.objects.get(
username=self.kwargs['username'])
context['account_stats'] = (
AccountsStatistics.objects.filter(username=user))
return context
except Exception:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment