def new_node(category, title, user, description='', parent=None):
 Node = apps.get_model('osf.Node')
 category = category
 title = strip_html(title.strip())
 if description:
  description = strip_html(description.strip())
 node = Node(title=title, category=category, creator=user, description=description, parent=parent)
 node.save()
 return node

def new_node ( category , title , user , description = '' , parent = None ) : Node = apps . get_model ( 'osf.Node' ) category = category title = strip_html ( title . strip ( ) ) if description : description = strip_html ( description . strip ( ) ) node = Node ( title = title , category = category , creator = user , description = description , parent = parent ) node . save ( ) return node
create a new project or component .