Skip to content

Commit

Permalink
Hexlet#180 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sch0nik committed Mar 26, 2023
1 parent 1e03dbd commit d86e532
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 241 deletions.
8 changes: 8 additions & 0 deletions contributors/views/contributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ def get_context_data(self, **kwargs):
'id',
'name',
)

context['current_contributor'] = self.object
current_user = self.request.user.contributor
if self.request.GET.get('compare') == 'yes':
context['my_contributions_for_year'] = (
current_user.contribution_set.for_year()
)

return context
Loading

0 comments on commit d86e532

Please sign in to comment.