Skip to content

Instantly share code, notes, and snippets.

@SmileyChris
Forked from converge/ok.py
Last active May 29, 2018 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SmileyChris/143863cd1208ae576c658b7934f4bbc8 to your computer and use it in GitHub Desktop.
Save SmileyChris/143863cd1208ae576c658b7934f4bbc8 to your computer and use it in GitHub Desktop.
class AccountsStatisticsDetail(TemplateView):
template_name = 'grow/accountsstatistics.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
username = self.kwargs.get('username')
if username:
context['username'] = username
context['account_stats'] = (
AccountsStatistics.objects
.filter(username__username=username)
)
return context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment