display available teams on dashboard and remove debugging print
This commit is contained in:
		
							parent
							
								
									6e67b50501
								
							
						
					
					
						commit
						40f4d1bb8d
					
				
					 2 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
					@ -22,7 +22,6 @@ class AvailableTeamsNode(template.Node):
 | 
				
			||||||
        request = context["request"]
 | 
					        request = context["request"]
 | 
				
			||||||
        teams = []
 | 
					        teams = []
 | 
				
			||||||
        for team in Team.objects.all():
 | 
					        for team in Team.objects.all():
 | 
				
			||||||
            print team
 | 
					 | 
				
			||||||
            state = team.get_state_for_user(request.user)
 | 
					            state = team.get_state_for_user(request.user)
 | 
				
			||||||
            if team.access == "open":
 | 
					            if team.access == "open":
 | 
				
			||||||
                if state in [None, "invited"]:
 | 
					                if state in [None, "invited"]:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -146,9 +146,14 @@
 | 
				
			||||||
                </ul>
 | 
					                </ul>
 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
            {% available_teams as available_teams %}
 | 
					            {% available_teams as available_teams %}
 | 
				
			||||||
            {% for team in available_team %}
 | 
					            {% if available_teams %}
 | 
				
			||||||
                {{ team }}
 | 
					                <h4>Available Teams</h4>
 | 
				
			||||||
            {% endfor %}
 | 
					                <ul>
 | 
				
			||||||
 | 
					                    {% for team in available_teams %}
 | 
				
			||||||
 | 
					                        <li>{{ team }} <span class="label">{{ team.get_access_display }}</span></li>
 | 
				
			||||||
 | 
					                    {% endfor %}
 | 
				
			||||||
 | 
					                </ul>
 | 
				
			||||||
 | 
					            {% endif %}
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue