def all_sheds(request): if request.user.is_anonymous(): return HttpResponseRedirect('/accounts/login') else: userProfile = profileUtil.getProfileFromUser(request.user) allSheds = shedUtil.getAllShedsAllSharezones() shedsInMySharezone = shedUtil.getAllShedsInSharezone(userProfile.sharezone) adminSheds = shedUtil.getAllShedsAdministratedBy(userProfile) ownedSheds = shedUtil.getAllShedsOwnedBy(userProfile) memberSheds = shedUtil.getAllShedsJoinedBy(userProfile) context = {} context.update(csrf(request)) context['sheds'] = allSheds context['adminSheds'] = adminSheds context['ownedSheds'] = ownedSheds context['mySheds'] = memberSheds context.update(content.genBaseLoggedIn(request)) return render_to_response('all_sheds.html', context)
def all_sheds(request): if request.user.is_anonymous(): return HttpResponseRedirect('/accounts/login') else: userProfile = profileUtil.getProfileFromUser(request.user) allSheds = shedUtil.getAllShedsAllSharezones() shedsInMySharezone = shedUtil.getAllShedsInSharezone( userProfile.sharezone) adminSheds = shedUtil.getAllShedsAdministratedBy(userProfile) ownedSheds = shedUtil.getAllShedsOwnedBy(userProfile) memberSheds = shedUtil.getAllShedsJoinedBy(userProfile) context = {} context.update(csrf(request)) context['sheds'] = allSheds context['adminSheds'] = adminSheds context['ownedSheds'] = ownedSheds context['mySheds'] = memberSheds context.update(content.genBaseLoggedIn(request)) return render_to_response('all_sheds.html', context)
def test_GetAllShedsAllSharezones(self): """ """ self.assertIn(self.getShed, shedUtils.getAllShedsAllSharezones())
def test_GetAllShedsAllSharezones(self): """ """ self.assertIn (self.getShed, shedUtils.getAllShedsAllSharezones())