diff --git a/symposion/teams/models.py b/symposion/teams/models.py index 4f9b4ed1..8ee38dba 100644 --- a/symposion/teams/models.py +++ b/symposion/teams/models.py @@ -26,6 +26,12 @@ class Team(models.Model): def __unicode__(self): return self.name + def get_state_for_user(self, user): + try: + return self.memberships.get(user=user).state + except Membership.DoesNotExist: + return None + MEMBERSHIP_STATE_CHOICES = [ ("applied", "applied"), diff --git a/symposion_project/templates/dashboard.html b/symposion_project/templates/dashboard.html index 33b3ee0b..15624294 100644 --- a/symposion_project/templates/dashboard.html +++ b/symposion_project/templates/dashboard.html @@ -135,7 +135,7 @@ {% for membership in user.memberships.all %}
  • {% if membership.state == "manager" %} - {{ membership.team.name }} + {{ membership.team.name }} {% else %} {{ membership.team.name }} {% endif %} diff --git a/symposion_project/urls.py b/symposion_project/urls.py index be8ace45..aed0447f 100644 --- a/symposion_project/urls.py +++ b/symposion_project/urls.py @@ -28,6 +28,7 @@ urlpatterns = patterns("", url(r"^proposals/", include("symposion.proposals.urls")), url(r"^sponsors/", include("symposion.sponsorship.urls")), url(r"^boxes/", include("symposion.boxes.urls")), + url(r"^teams/", include("symposion.teams.urls")), url(r"^markitup/", include("markitup.urls")), url(r"^", include("symposion.cms.urls")),