예제 #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,
    }
예제 #2
0
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,
    }
예제 #3
0
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,
    }
예제 #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,
    }
예제 #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,
    }
예제 #6
0
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,
    }
예제 #7
0
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,
    }
예제 #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,
    }
예제 #9
0
파일: api.py 프로젝트: Sinar/sinarngo.story
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,
    }
예제 #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,
    }
예제 #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,
    }
예제 #12
0
파일: api.py 프로젝트: oikoumene/wcc.api
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,
    }
예제 #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,
    }
예제 #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,
    }
예제 #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,
    }
예제 #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,
    }
예제 #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"])
예제 #19
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"])