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

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

src/d/j/django-profiling-0.1/dprofiling/backends/db.py   django-profiling(Download)
    def store(self, path, profile):
        temp = None
        try:
            session = Session.on_site.get(path=path, active=True)
        except (Session.DoesNotExist, Session.MultipleObjectsReturned) as e:

src/d/j/django-profiling-0.1/dprofiling/tests/backends/db.py   django-profiling(Download)
    def _check_profile_created(self, response):
        session = Session.on_site.get(path=response.request['PATH_INFO'], active=True)
        qs = Profile.objects.filter(session=session)
        self.assertEqual(qs.count(), 1)
        qs.delete()
        self.client.get('/a/')
        backend = get_backend()
        stats, output = backend.get_stats(Session.on_site.get(path='/a/',active=True))
        self.assertIsInstance(stats, Stats)
        stats.print_stats()