Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/p/o/portfoliyo-HEAD/portfoliyo/view/village/views.py   portfoliyo(Download)
def dashboard(request, group_id=None):
    """Group dashboard."""
    if group_id is None:
        group = model.AllStudentsGroup(request.user.profile)
    else:
def group(request, group_id=None):
    """The main chat view for a group."""
    if group_id is None:
        group = model.AllStudentsGroup(request.user.profile)
        posting_url = reverse('create_post')
                    owner=request.user.profile), pk=group_id)
        else:
            group = model.AllStudentsGroup(request.user.profile)
        all_elders = group.all_elders
 

src/p/o/portfoliyo-HEAD/portfoliyo/api/resources.py   portfoliyo(Download)
    def _group_unread_counts(self, groups, request, profile):
        # This is called when the group queryset is evaluated; we attach an
        # `all_students_group` to the request, and send it along for the
        # unread-counts-fetching along with the other groups.
        request.all_students_group = model.AllStudentsGroup(profile)

src/p/o/portfoliyo-HEAD/portfoliyo/tests/model/users/test_models.py   portfoliyo(Download)
        rel2 = factories.RelationshipFactory.create(from_profile=rel.elder)
        rel3 = factories.RelationshipFactory.create(to_profile=rel.student)
        g = model.AllStudentsGroup(rel.elder)
 
        assert set(g.elder_relationships) == set([rel, rel2, rel3])
        rel2 = factories.RelationshipFactory.create(from_profile=rel.elder)
        factories.RelationshipFactory.create(to_profile=rel.student)
        g = model.AllStudentsGroup(rel.elder)
 
        assert set(g.students) == set([rel.student, rel2.student])
        factories.RelationshipFactory.create(
            from_profile__name='A', to_profile=rel.student)
        g = model.AllStudentsGroup(rel.elder)
 
        # alphabetically ordered by name

src/p/o/portfoliyo-HEAD/portfoliyo/tests/view/village/test_views.py   portfoliyo(Download)
            self.assert_posts(
                views._get_posts(
                    post1.author, group=model.AllStudentsGroup(post1.author)),
                [post1, post2],
                )