Example #1
0
def update(context, request, uid=None):
    """ update links
    """
    items = update_items("Link", uid=uid, endpoint="links")
    return {
        "url": url_for("links_update"),
        "count": len(items),
        "items": items,
    }
def update(context, request, uid=None):
    """ update collections
    """
    items = update_items("Collection", uid=uid, endpoint="collections")
    return {
        "url": url_for("collections_update"),
        "count": len(items),
        "items": items,
    }
def update(context, request, uid=None):
    """ update newsitems
    """
    items = update_items("News Item", uid=uid, endpoint="newsitems")
    return {
        "url": url_for("newsitems_update"),
        "count": len(items),
        "items": items,
    }
Example #4
0
def update(context, request, uid=None):
    """ update todos
    """
    items = update_items("plone.todos.todo", request, uid=uid, endpoint="todos")
    return {
        "url": url_for("todos_update"),
        "count": len(items),
        "items": items,
    }
Example #5
0
def update(context, request, uid=None):
    """ update images
    """
    items = update_items("Image", uid=uid, endpoint="images")
    return {
        "url": url_for("images_update"),
        "count": len(items),
        "items": items,
    }
def update(context, request, uid=None):
    """ update newsitems
    """
    items = update_items("News Item", uid=uid, endpoint="newsitems")
    return {
        "url": url_for("newsitems_update"),
        "count": len(items),
        "items": items,
    }
def update(context, request, uid=None):
    """ update collections
    """
    items = update_items("Collection", uid=uid, endpoint="collections")
    return {
        "url": url_for("collections_update"),
        "count": len(items),
        "items": items,
    }
Example #8
0
def update(context, request, uid=None):
    """ update content
    """
    items = update_items(uid=uid)
    return {
        "url": url_for("update"),
        "count": len(items),
        "items": items,
    }
Example #9
0
def update(context, request, uid=None):
    """ update story
    """
    items = update_items("sinarngo.story.story", request, uid=uid, endpoint="story")
    return {
        "url": url_for("story_update"),
        "count": len(items),
        "items": items,
    }
Example #10
0
def update(context, request, uid=None):
    """ update events
    """
    items = update_items("Event", uid=uid, endpoint="events")
    return {
        "url": url_for("events_update"),
        "count": len(items),
        "items": items,
    }
Example #11
0
def update(context, request, uid=None):
    """ update links
    """
    items = update_items("Link", uid=uid, endpoint="links")
    return {
        "url": url_for("links_update"),
        "count": len(items),
        "items": items,
    }
Example #12
0
def update(context, request, uid=None):
    """ update wccdocument
    """
    items = update_items("wcc.document.document", request, uid=uid, endpoint="wccdocument")
    return {
        "url": url_for("wccdocument_update"),
        "count": len(items),
        "items": items,
    }
Example #13
0
def update(context, request, uid=None):
    """ update content
    """
    items = update_items(uid=uid)
    return {
        "url": url_for("update"),
        "count": len(items),
        "items": items,
    }
Example #14
0
def update(context, request, uid=None):
    """ update topics
    """
    items = update_items("Topic", uid=uid, endpoint="topics")
    return {
        "url": url_for("topics_update"),
        "count": len(items),
        "items": items,
    }
def update(context, request, uid=None):
    """ update folders
    """
    items = update_items("Folder", request, uid=uid, endpoint="folders")
    return {
        "url": url_for("folders_update"),
        "count": len(items),
        "items": items,
    }
Example #16
0
def update(context, request, uid=None):
    """ update events
    """
    items = update_items("Event", uid=uid, endpoint="events")
    return {
        "url": url_for("events_update"),
        "count": len(items),
        "items": items,
    }
Example #17
0
def update(context, request, uid=None):
    """ update folders
    """
    items = update_items("Folder", uid=uid, endpoint="folders")
    return {
        "url": url_for("folders_update"),
        "count": len(items),
        "items": items,
    }
Example #18
0
 def test_update_items(self):
     data = {"title": "Test Folder Changed"}
     self.request["BODY"] = json.dumps(data)
     self.assertEqual(self.test_folder.Title(), "Test Folder")
     api.update_items("Folder", uid=self.test_folder.UID())
     self.assertEqual(self.test_folder.Title(), data["title"])
 def test_update_items(self):
     data = {"title": "Test Folder Changed"}
     self.request["BODY"] = json.dumps(data)
     self.assertEqual(self.test_folder.Title(), "Test Folder")
     api.update_items("Folder", uid=self.test_folder.UID())
     self.assertEqual(self.test_folder.Title(), data["title"])