diff --git a/wcivf/apps/people/models.py b/wcivf/apps/people/models.py index 2f0b6374f..e9b9a4a07 100644 --- a/wcivf/apps/people/models.py +++ b/wcivf/apps/people/models.py @@ -154,6 +154,22 @@ def get_max_facebook_ad_spend(self): ) ) + @property + def facebook_personal_username(self): + facebook_personal_url = self.facebook_personal_url + facebook_split = list(filter(None, facebook_personal_url.split("/"))) + facebook_personal_username = facebook_split[-1] + + return facebook_personal_username + + @property + def instagram_username(self): + instagram_url = self.instagram_url + instagram_split = list(filter(None, instagram_url.split("/"))) + instagram_username = instagram_split[-1] + + return instagram_username + @cached_property def current_or_future_candidacies(self): """ diff --git a/wcivf/apps/people/templates/people/person_detail.html b/wcivf/apps/people/templates/people/person_detail.html index a39c54ca6..c805ea014 100644 --- a/wcivf/apps/people/templates/people/person_detail.html +++ b/wcivf/apps/people/templates/people/person_detail.html @@ -176,22 +176,19 @@