(db, design_dir, design_name, temp=None)
pushes design documents and brings new index up to date if temp

    for example it can be used to push new changes to the myapp design doc to
    _design/myapp-tmp

    and then trigger an index of _design/myapp-tmp
pushes design documents and brings new index up to date if temp
pushes design documents and brings new index up to date if temp
def sync_design_docs(db, design_dir, design_name, temp=None):
    """
    pushes design documents and brings new index up to date if temp

    for example it can be used to push new changes to the myapp design doc to
    _design/myapp-tmp

    and then trigger an index of _design/myapp-tmp

    """
    design_name_ = '%s-%s' % (design_name, temp) if temp else design_name
    docid = "_design/%s" % design_name_
    push(design_dir, db, force=True, docid=docid)
    log.info("synced '%s' in couchdb", design_name)
    if temp:
        index_design_docs(db, docid, design_name_)
def sync_design_docs ( db , design_dir , design_name , temp = None ) : design_name_ = '%s-%s' % ( design_name , temp ) if temp else design_name docid = "_design/%s" % design_name_ push ( design_dir , db , force = True , docid = docid ) log . info ( "synced '%s' in couchdb" , design_name ) if temp : index_design_docs ( db , docid , design_name_ )