python文件
def nginx_update(request): all_server = NginxEThistory.objects.all() paginator = Paginator(all_server,20) try: page = int(request.GET.get('page','1')) except ValueError: page = 1 try: all_server = paginator.page(page) except : all_server = paginator.page(paginator.num_pages) return render_to_response('nginx_history.html', {'all_host_list': all_server, 'page': page, 'paginator':paginator},context_instance=RequestContext(request))
html文件
{% extends "index.html" %} {% block title %}OMS{% endblock %} {% block css %} <!-- DataTables--> <link rel="stylesheet" href="/static/plugins/dataTables/css/dataTables.css"> {% endblock %} {% block content %} <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-body"> {% if all_host_list %} <table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%"> <thead> <tr> <th>ID</th> <th>文件名</th> <th>回顯</th> </tr> </thead> <tbody> {% for all_host in all_host_list %} <tr> <td>{{ forloop.counter }}</td> <td>{{ all_host.filename }}</td> <td>{{ all_host.message }}</td> <td><a href="http://:8999/nginxbjh/?id={{ all_host.id }}" class="btn btn-info btn-sm">編輯</a> <a href="{% url 'huixianhistory' id=all_host.id %}" class="btn btn-info btn-sm">回顯展示</a></td> </tr> {% endfor %} </tbody> </table> {% endif %} <div class="row"> <div class="col-xs-6"> <div class="dataTables_info" id="example_info" role="alert" aria-live="polite" aria-relevant="all"></div> </div> <div class="col-xs-6"> <div class="dataTables_paginate paging_simple_numbers" id="exmaple_paginate"> <a href="{% url 'xianip' %}" class="btn btn-info btn-sm" role="button">添加</a> {% if all_host_list.has_previous %} <a href="?page={{ all_host_list.previous_page_number }}">上一頁(yè)</a> {% endif %} <span class="current"> 第{{ all_host_list.number }}頁(yè),共{{ all_host_list.paginator.num_pages }}頁(yè) </span> {% if all_host_list.has_next %} <a href="?page={{ all_host_list.next_page_number }}">下一頁(yè)</a> {% endif %} </div> </div> </div> <!--row end--> </div> </div> </div> {% endblock %}
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線(xiàn),公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿(mǎn)足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。
網(wǎng)站標(biāo)題:配置文件更新展示-創(chuàng)新互聯(lián)
URL分享:http://www.rwnh.cn/article32/jossc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站內(nèi)鏈、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、靜態(tài)網(wǎng)站、網(wǎng)站收錄、建站公司、微信公眾號(hào)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)