Skip to content

Commit

Permalink
Method for linkedin username
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Feb 16, 2021
1 parent bbe70b7 commit 67d9f95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions wcivf/apps/people/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ def instagram_username(self):

return instagram_username

@property
def linkedin_username(self):
linkedin_url = self.linkedin_url
linkedin_split = list(filter(None, linkedin_url.split("/")))
linkedin_username = linkedin_split[-1]

return linkedin_username

@cached_property
def current_or_future_candidacies(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion wcivf/apps/people/templates/people/person_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h3>Associated companies</h3>
<dt>LinkedIn</dt>
<dd>
<a href="{{ object.linkedin_url }}" title="{{ object.name }}'s LinkedIn profile">
{{ object.linkedin_url }}
{{ object.linkedin_username}}
</a>
</dd>
{% endif %}
Expand Down

0 comments on commit 67d9f95

Please sign in to comment.