Skip to content

Commit

Permalink
Added third vice captain in clubs
Browse files Browse the repository at this point in the history
  • Loading branch information
anshulahuja98 authored and ajatprabha committed Sep 26, 2018
1 parent 9243ff1 commit e3c5b8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fixture/clubfixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Meta:
captain = factory.SubFactory(UserProfileFactory)
vice_captain_one = factory.SubFactory(UserProfileFactory)
vice_captain_two = factory.SubFactory(UserProfileFactory)
vice_captain_three = factory.SubFactory(UserProfileFactory)
mentor = factory.SubFactory(UserProfileFactory)
# gallery = models.ForeignKey(Gallery, blank=True, null=True, on_delete=models.SET_NULL,
resources_link = factory.Faker('url')
Expand Down
3 changes: 3 additions & 0 deletions src/main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class Club(models.Model):
vice_captain_two = models.ForeignKey(UserProfile, related_name='vice_cap_two',
limit_choices_to={'user__is_staff': True},
blank=True, null=True, default=None, on_delete=models.SET_NULL)
vice_captain_three = models.ForeignKey(UserProfile, related_name='vice_cap_three',
limit_choices_to={'user__is_staff': True},
blank=True, null=True, default=None, on_delete=models.SET_NULL)
mentor = models.ForeignKey(UserProfile, related_name='cmentor', blank=True, null=True, default=None,
on_delete=models.SET_NULL)
core_members = models.ManyToManyField(UserProfile, blank=True)
Expand Down
3 changes: 3 additions & 0 deletions src/templates/main/club.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ <h3 class="h3-responsive white-text mb-0">Key People</h3>
{% if club.vice_captain_two %}
{% include 'main/mixins/club_user_round_card_mixin.html' with userprofile=club.vice_captain_two designation='Vice Captain' %}
{% endif %}
{% if club.vice_captain_three %}
{% include 'main/mixins/club_user_round_card_mixin.html' with userprofile=club.vice_captain_three designation='Vice Captain' %}
{% endif %}
{% if club.mentor %}
{% include 'main/mixins/club_user_round_card_mixin.html' with userprofile=club.mentor designation='Mentor' %}
{% endif %}
Expand Down

0 comments on commit e3c5b8d

Please sign in to comment.