當前位置: 首頁>>代碼示例>>Python>>正文


Python Directory.create_meeting方法代碼示例

本文整理匯總了Python中Directory.create_meeting方法的典型用法代碼示例。如果您正苦於以下問題:Python Directory.create_meeting方法的具體用法?Python Directory.create_meeting怎麽用?Python Directory.create_meeting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Directory的用法示例。


在下文中一共展示了Directory.create_meeting方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: send_administrator_home

# 需要導入模塊: import Directory [as 別名]
# 或者: from Directory import create_meeting [as 別名]

#.........這裏部分代碼省略.........
              text = encode(text);
              window.location.href = "''' + request.cgi_href(_adminaction='editmeetingname', itemid=None, global_meetingid=None, meetingname=None) + '''&global_meetingid=" + global_meetingid + "&meetingname=" + text;
            }
          }
        }
        
        function deleteMeeting(mtginfo) {
          parseSelectedMeeting(mtginfo);
          if (global_meetingid == '') {
            alert("Please select a program.");
          }else if (confirm("Delete this program and all associated data?")) {
            window.location.href="''' + request.cgi_href(_adminaction='delitem', id=None) + '''&id=" + global_meetingid;
          }
        }
        
        function editUser(urinfo) {
	  var selectedUser = 'userinfo_' + urinfo;
          var userid = urinfo;
          if (userid == '') {
            alert('Please select a user to edit');
          }else{
            window.location.href="''' + request.cgi_href(_adminaction="edituser", userid=None) + '''&userid=" + userid;
          }
        }
        
        function deleteUser(urinfo) {
	  var selectedUser = 'userinfo_' + urinfo;
          var userid = urinfo;
          if (userid == '') {
            alert('Please select a non-administrator user to delete');
          }else{
            if (confirm('Delete this user?')) {
              window.location.href="''' + request.cgi_href(_adminaction="deluser", userid=None) + '''&userid=" + userid;
            }
          }
        }

      //-->
      </script>
      </head>
    ''')
    
    # switch based upon the action
    action = request.getvalue('_adminaction', '')
    if action == 'edituser':
      self.edit_user(request)
      self.main_page(request)
    
    elif action == 'deluser':
      self.del_user(request)
      self.main_page(request)
      
    elif action == 'delitem':
      self.del_item(request)
      self.main_page(request)
      
    elif action == 'saveuser':
      self.save_user(request)
      self.main_page(request)
      
    elif action == 'generateusers':
      self.generate_users(request)
      
    elif action == 'dogenerateusers':
      self.do_generate_users(request)
      self.main_page(request)
      
    elif action == 'dodeleteusers':
      self.do_delete_users(request)
      self.main_page(request)
      
    elif action == 'exportusers':
      self.export_users(request)
      
    elif action == 'newmeeting':
      meeting = Directory.create_meeting(request.getvalue('meetingname', ''), request.getvalue('meetingview', ''), request.session.user.id)
      meeting.type = BaseView.MEETING_ROOT_ITEM
      meeting.status = 0
      meeting.save()
      log.info(str(meeting))
      
      groups = datagate.create_item(creatorid=request.session.user.id, parentid=meeting.id)  
      groups.name='groups'
      groups.save()
      # allow the view to initialize itself
      BaseView.views[meeting.view.lower()].initialize_activity(request, meeting)
      self.main_page(request)
            
    elif action == 'editmeetingname':
      meeting = datagate.get_item(request.getvalue('global_meetingid', ''))
      meeting.name = request.getvalue('meetingname')
      meeting.save()
      log.info(str(meeting))
      self.main_page(request)
      
    else:
      self.main_page(request)     

    # page footer
    request.writeln("</body></html>")
開發者ID:ssaltzman,項目名稱:POET,代碼行數:104,代碼來源:Administrator.py


注:本文中的Directory.create_meeting方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。