def systemmessage(): form = MessageForm() if form.validate_on_submit(): message = {'username': '******', 'text': form.message.data} redis.publish('chat', json.dumps(message)) flash('System message send success', 'success') return redirect(url_for('admin.message'))
def message(): form = MessageForm() if form.validate_on_submit(): message = form.create_message() flash('系统消息发送成功', 'success') return redirect(url_for('live.systemmessage', message=message)) return render_template('admin/message.html', form=form)
def send_message(): form = MessageForm() if form.validate_on_submit(): form.send_message() flash('消息发送成功', 'success') return redirect(url_for('admin.send_message')) return render_template('admin/send_message.html', form=form)
def systemmessage(): form = MessageForm() if form.validate_on_submit(): my_redis.publish( 'chat', json.dumps(dict(username='******', text=form.text.data))) flash('系统消息发送成功', 'success') return redirect(url_for('admin.message'))
def systemmessage(): form = MessageForm() if form.validate_on_submit(): redis.publish('chat', json.dumps(dict(username='******', text=form.text.data))) flash('系统消息发送成功', 'success') return redirect(url_for('live.systemmessage')) return render_template('admin/message.html', form=form)
def send_message(): form = MessageForm() if form.validate_on_submit(): redis.publish('chat', json.dumps(dict( username='******', text=form.text.data ))) flash('系统消息发送成功', 'success') return redirect(url_for('admin.index')) return render_template('admin/message.html', form=form)
def send_message(): form = MessageForm() if form.validate_on_submit(): redis.publish( 'chat', json.dumps({ 'username': '******', 'text': form.text.data })) flash('Message sended successly.', 'success') return redirect(url_for('admin.index')) return render_template('admin/message.html', form=form)
def message(): form = MessageForm() if form.validate_on_submit(): redis.publish( 'chat', json.dumps(dict( username='******', text=str(form.msg.data) ))) flash('Send Message,OK!') return render_template('admin/sys_msg.html',form=form)
def message(): form = MessageForm() return render_template('admin/message.html', form=form)