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

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

src/d/j/djedi-cms-1.0/djedi/admin/api.py   djedi-cms(Download)
        """
        uri = self.decode_uri(uri)
        node = cio.load(uri)
        return self.render_to_json(node)
 
        node = cio.set(uri, data, publish=False, **meta)
 
        context = cio.load(node.uri)
        context['content'] = node.content
 

src/c/o/content-io-1.0.1/tests/test_api.py   content-io(Download)
        self.assertEqual(len(set(cio.revisions('i18n://sv-se@page/title'))), 0)
 
        node = cio.load('sv-se@page/title')
        self.assertDictEqual(node, {
            'uri': 'i18n://sv-se@page/title.txt',
 
        # Load version 1 and 2
        data = cio.load('sv-se@page/title#1')
        self.assertEqual(data['uri'], 'i18n://sv-se@page/title.txt#1')
        self.assertEqual(data['data'], u'Content-IO')
        data = cio.load('sv-se@page/title#2')
 
        # Load without version and expect published version
        data = cio.load('sv-se@page/title')
        self.assertEqual(data['uri'], 'i18n://sv-se@page/title.txt#1')
        self.assertEqual(data['data'], u'Content-IO')
        self.assertEqual(len(node.meta.keys()), 0)  # Cached node has no meta
 
        node = cio.load('sv-se@page/title#1')
        meta = node['meta']
        self.assertKeys(meta, 'author', 'modified_at', 'published_at', 'is_published')

src/c/o/content-io-HEAD/tests/test_api.py   content-io(Download)
        self.assertEqual(len(set(cio.revisions('i18n://sv-se@page/title'))), 0)
 
        node = cio.load('sv-se@page/title')
        self.assertDictEqual(node, {
            'uri': 'i18n://sv-se@page/title.txt',
 
        # Load version 1 and 2
        data = cio.load('sv-se@page/title#1')
        self.assertEqual(data['uri'], 'i18n://sv-se@page/title.txt#1')
        self.assertEqual(data['data'], u'Content-IO')
        data = cio.load('sv-se@page/title#2')
 
        # Load without version and expect published version
        data = cio.load('sv-se@page/title')
        self.assertEqual(data['uri'], 'i18n://sv-se@page/title.txt#1')
        self.assertEqual(data['data'], u'Content-IO')
        self.assertEqual(len(node.meta.keys()), 0)  # Cached node has no meta
 
        node = cio.load('sv-se@page/title#1')
        meta = node['meta']
        self.assertKeys(meta, 'author', 'modified_at', 'published_at', 'is_published')

src/d/j/djedi-cms-1.0/djedi/tests/test_rest.py   djedi-cms(Download)
 
            # Post new resized version
            node = cio.load(uri)
            del form['data[file]']
            del form['data[crop]']