Example #1
0
from helpers.director.shortcut import page_dc
from .models import Page
import json
from helpers.pcweb.shotcut import web_page_dc

#def uie_backend_page(text):
#pass


class WebPage(object):
    def __init__(self, request, *args, **kwargs):
        self.request = request

    def get_template(self):
        return 'director/vuebase.html'

    def get_context(self):
        pagename = self.request.GET.get('uie')
        inst = Page.objects.get(name=pagename)
        return {
            'editor': 'uie-mount-view',
            'editor_ctx': {
                'heads': json.loads(inst.content)
                #'tableCtx':{ 'autoHeight':True,'opMergeCount':3, **DeviceTable().get_head_context()}
            }
        }


web_page_dc.update({'uie': WebPage})
Example #2
0
                 #'subtitle':'互联网技术带来了第四次工业革命,带来了空前的变革,搭上这趟快车,您将拥有无限可能!'}, #'image_url':'http://h1.ioliu.cn/bing/BlueChip_ZH-CN7376022522_1920x1080.jpg'},
                
 
                
                #{'editor':'com-top-block-ctn',
                 #'title_editor':'com-block-title-line',
                 #'title':'我们的特点',
                 #'sub_title':'与众不同,独领风骚',
                 #'items':[
                    #{'editor':'com-ti-caption2','class':'wow zoomIn',
                     #'image_url':static_url( 'image/admin_sys.jpg' ),
                     #'title':'新技术高效率','sub_title':'python+django+vuejs模块化开发,速度惊人'} ,
                    #{'editor':'com-ti-caption2','class':'wow zoomIn',
                     #'image_url':static_url( 'image/collective-3300872_640.png' ),
                     #'title':'模块化低成本',
                     #'sub_title':'模块化开发,人力成本降低,费用大幅减少'} ,
                    #{'editor':'com-ti-caption2','class':'wow zoomIn',
                     #'image_url':static_url( 'image/owl-50267_640.jpg' ),
                     #'title':'全站开发易维护',
                     #'sub_title':'全栈开发,程序统一而连贯,极大提高程序的可维护性。使得项目长期维护成为可能。灵活多变。'} ,
                #]}
                #{'editor':'com-slide-win','images':[
                    #{'url':'xxx'},
                    #{'url':'bbb'},
                #]}
            ]
        }

web_page_dc.update({
    'home':SoftJingHome
})
Example #3
0
from helpers.pcweb.shotcut import web_page_dc
from django.conf import settings


class RTMSendPage(object):
    def __init__(self, request, engin):
        pass

    def get_template(self):
        return 'pcweb/pcweb.html'

    def get_label(self):
        return 'rtm发送页面'

    def get_context(self):
        return {
            'tops': [
                {
                    'editor': 'com-rtm-send'
                },
            ]
        }


web_page_dc.update({'rtm-send': RTMSendPage})
Example #4
0
                        #{'name':'content','editor':'com-example-content',},
                        #],
                 #'full_width':True,
                 #'image_url':static_url('image/server-2160321_1280.webp'),
                 #'class':'my-top-image',
                 #'css':''' .my-top-image .head{height:70px}
                           #.my-top-image .head img{height:370px}
                           #.my-top-image .content{margin-bottom:40px}
                           #''',  
                 ##'inn_editor':'com-example-content',
                
                 #},
                
            ]
        }


class ExampleInfoList(ModelTable):
    model = ExampleInfo
    exclude = []
    nolimit = True
    def inn_filter(self, query):
        return query.filter(kind=self.kw.get('kind'))

director.update({
    'example-list':ExampleInfoList
})
    
web_page_dc.update({
    'example':ExamplePage,
})
Example #5
0
                #'main_items':[
                #{'editor':'com-ti-article','row':row,
                #'class':'number-head',
                #'mounted_express':'document.title= "%s"'%row.get('title'),}
                #],
                #'small_items':get_right_side_panel()
                #}
            ]
        }
        return ctx

    class fieldsCls(ModelFields):
        nolimit = True

        class Meta:
            model = Article
            exclude = []

        def get_row(self):
            row = super().get_row()
            return row

        def dict_row(self, inst):
            return {'content': inst.content}


web_page_dc.update({
    'articlelist': ArticleListPage,
    'article': ArticlePage,
})
Example #6
0
                },
                {
                    'editor': 'com-rtc-stop-robot'
                },
                #{'editor':'com-rtc-trigger'},
                #*rtc_send,
                #{'editor':'com-rtc-send'},
                #{'editor':'com-rtc-send'},
                #{'editor':'com-rtc-send'},
            ]
        }


@director_view('robot_receive_call')
def send_sss(src, dst, channel_name):
    robot_receive_call(src, dst, channel_name)


@director_view('robot_call_user')
def sss(src, dst_list, channel_name, taskid):
    robot_call_user(src, dst_list, channel_name, taskid)


@director_view('recording_test')
def recording_test(channel):
    recording(channel)
    #recording.delay(channel)


web_page_dc.update({'rtc-robot': RobotTestPage})
Example #7
0
from helpers.pcweb.shotcut import web_page_dc
from django.conf import settings

class PanelPage(object):
    def __init__(self, request, engin):
        pass
    def get_template(self):
        return 'pcweb/pcweb.html'
    
    def get_label(self):
        return 'rtc发送页面'
    
    def get_context(self):
            
        return {
            'tops':[
                {'editor':'com-cs-top-pannel','links':[
                    {'label':'管理后台','src':'/pc/callrecord',},
                    {'label':'后台文档','src':'/doc',},
                    {'label':'rabbitmq后台','src':'http://liu.enjoyst.com:10830/','detail':'账号:voice;密码:voice;'},
                    {'label':'elk日志','src':'http://liu.enjoyst.com:10821/','detail':'账号:voice;密码:voice123'},
                    {'label':'rtc模拟','src':'/rtc','detail':'rtc客户端'},
                    {'label':'机器人拨打','src':'/ago/rtc-robot','detail':'机器人测试;录制频道;踢出机器人'},
                    
                ]}
            ]
        }
    
web_page_dc.update({
    'p':PanelPage
})
Example #8
0
        pass

    def get_template(self):
        return 'pcweb/pcweb.html'

    def get_label(self):
        return 'rtc发送页面'

    def get_context(self):
        #rtc_send=[]
        #for i in range(1):
        #rtc_send.append( {'editor':'com-rtc-send','appid':settings.AGORA.get('appID')})

        return {
            'tops':
            [{
                'editor': 'com-rtc-send',
                'appid': settings.AGORA.get('appID'),
                'websocket': settings.WEBSOCKET
            }
             #{'editor':'com-rtc-trigger'},
             #*rtc_send,
             #{'editor':'com-rtc-send'},
             #{'editor':'com-rtc-send'},
             #{'editor':'com-rtc-send'},
             ]
        }


web_page_dc.update({'rtc-send': RTCSendPage})
Example #9
0
    def get_label(self):
        return '样例'
    
    article_tag = "example"
    


#@director_element('article.list')
#class ArticleList(ModelTable):
    #nolimit=True
    #model = Article
    #exclude =[]
    #simple_dict = True
    
    #def inn_filter(self, query):
        #query = query.filter(status=1).order_by('order')
        #if self.kw.get('kind'):
            #return query.filter(kind = self.kw.get('kind'))
        #else:
            #return query
    
    #def dict_row(self, inst):
        #return {
            #'sub_title': textify(  truncatehtml( inst.content,90 ) ),
            
        #}

web_page_dc.update({
    'sample':Example2Page
})