Django 搭建CMDB系统完整[13](运维记录)

models.py 添加表

class Yunweijilu(models.Model):
machinaroom= models.ForeignKey(Machinaroom)
id =models.AutoField(primary_key=True)
type=models.SmallIntegerField(default=0)
wtms=models.CharField('问题描述',max_length=200,default="")
wtly=models.CharField('问题来源',max_length=64,default="")
wtjssj=models.DateTimeField('问题接收时间',default=timezone.now)
clr=models.CharField('处理人',max_length=64,default="")
kssj=models.DateTimeField('开始时间',default=timezone.now)
jssj=models.DateTimeField('结束时间',default=timezone.now)
clbf=models.CharField('处理办法',max_length=300,default="")
memo=models.CharField('备注',max_length=200,default="")

yunweijiluviews.py

-- coding: utf-8 --

from future import unicode_literals

from django.shortcuts import render,render_to_response
from django.core.paginator import Paginator,InvalidPage,EmptyPage
from cmdbapp.models import *
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from xlwt import *
import StringIO,datetime,time
from django.utils.http import urlquote

def search_yunweijilu(request):
error = False
each_page = 10
wtms=request.GET.get('wtms','').strip()
wtly=request.GET.get('wtly','').strip()
clr=request.GET.get('clr','').strip()
yb=str(int(time.strftime('%Y',time.localtime(time.time())))-3)
ya=str(int(time.strftime('%Y',time.localtime(time.time())))+3)
tb=yb+"-12-12 12:12"
ta=ya+"-12-12 12:12"
kssj=datetime.datetime.strptime(request.GET.get('kssj',tb),'%Y-%m-%d %H:%M')
machinaroom=int(request.GET.get("machinaroom","100"))
machinaroomlist=Machinaroom.objects.all()
if wtms=='' and wtly=='' and clr=='' and type==100 and machinaroom==100:
q={}
q['kssj__gte']=kssj
q['jssj__lte']=jssj
record_list = Yunweijilu.objects.filter(q).order_by("wtjssj")
paginator = Paginator(record_list,each_page)
try:
page = int(request.GET.get('page', '1'))
except ValueError:
page = 1
try:
contacts = paginator.page(page)
except (EmptyPage, InvalidPage):
contacts = paginator.page(paginator.num_pages)
return render_to_response('search_yunweijilu.html',{'yunweijilulist':contacts,"wtms":wtms,"wtly":wtly,"clr":clr,"kssj":kssj,"jssj":jssj,"type":type,"machinaroom":machinaroom,"machinaroomlist":machinaroomlist})
else:
q={}
if wtms!='':
q['wtms__icontains']=wtms
if wtly!='':
q['wtly__icontains']=wtly
if clr!='':
q['clr__icontains']=clr
if type!=100:
q['type']=type
if machinaroom!=100:
q['machinaroom_id']=machinaroom
q['kssj__gte']=kssj
q['jssj__lte']=jssj
record_list = Yunweijilu.objects.filter(
q).order_by("wtjssj")
paginator = Paginator(record_list,each_page)
try:
page = int(request.GET.get('page', '1'))
except ValueError:
page = 1
try:
contacts = paginator.page(page)
except (EmptyPage, InvalidPage):
contacts = paginator.page(paginator.num_pages)
return render_to_response('search_yunweijilu.html',{'yunweijilulist':contacts,"wtms":wtms,"wtly":wtly,"clr":clr,"kssj":kssj,"jssj":jssj,"type":type,"machinaroom":machinaroom,"machinaroomlist":machinaroomlist})
def add_yunweijilu(request):
if request.method=='GET':
machinaroomlist=Machinaroom.objects.all()
return render_to_response("add_yunweijilu.html",{"machinaroomlist":machinaroomlist})
else:
yb=str(int(time.strftime('%Y',time.localtime(time.time())))-3)
ya=str(int(time.strftime('%Y',time.localtime(time.time())))+3)
tb=yb+"-12-12 12:12"
ta=ya+"-12-12 12:12"
wtms=request.POST.get("yunweijiluwtms","")
wtly=request.POST.get("yunweijiluwtly","")
wtjssj=datetime.datetime.strptime(request.POST.get('yunweijiluwtjssj',tb),'%Y-%m-%d %H:%M')
clr=request.POST.get("yunweijiluclr","")
kssj=datetime.datetime.strptime(request.POST.get('yunweijilukssj',tb),'%Y-%m-%d %H:%M')
jssj=datetime.datetime.strptime(request.POST.get('yunweijilujssj',ta),'%Y-%m-%d %H:%M')
clbf=request.POST.get("yunweijiluclbf","")
type=request.POST.get("yunweijilutype")
memo=request.POST.get("yunweijilumemo","")
machinaroomid=int(request.POST.get("yunweijilumachinaroom"))
machinaroom=Machinaroom.objects.get(id=machinaroomid)
uu=Yunweijilu(wtms=wtms,wtly=wtly,wtjssj=wtjssj,memo=memo,clr=clr,kssj=kssj,jssj=jssj,type=type,clbf=clbf,machinaroom=machinaroom)
uu.save()
machinaroomlist=Machinaroom.objects.all()
return HttpResponseRedirect("add_yunweijilu.html",{"machinaroomlist":machinaroomlist})
def edit_yunweijilu(request):
if request.method=='GET':
machinaroomlist=Machinaroom.objects.all()
obj=Yunweijilu.objects.get(id=int(request.GET.get('id')))
return render_to_response('edit_yunweijilu.html',{'yunweijilu':obj,"machinaroomlist":machinaroomlist})
else:
yb=str(int(time.strftime('%Y',time.localtime(time.time())))-3)
ya=str(int(time.strftime('%Y',time.localtime(time.time())))+3)
tb=yb+"-12-12 12:12"
ta=ya+"-12-12 12:12"
id=request.POST.get("id")
wtms=request.POST.get("yunweijiluwtms","")
wtly=request.POST.get("yunweijiluwtly","")
wtjssj=datetime.datetime.strptime(request.POST.get('yunweijiluwtjssj',tb),'%Y-%m-%d %H:%M')
clr=request.POST.get("yunweijiluclr","")
kssj=datetime.datetime.strptime(request.POST.get('yunweijilukssj',tb),'%Y-%m-%d %H:%M')
jssj=datetime.datetime.strptime(request.POST.get('yunweijilujssj',ta),'%Y-%m-%d %H:%M')
type=request.POST.get("yunweijilutype")
clbf=request.POST.get("yunweijiluclbf","")
memo=request.POST.get("yunweijilumemo","")
machinaroomid=int(request.POST.get("yunweijilumachinaroom"))
machinaroom=Machinaroom.objects.get(id=machinaroomid)
uu=Yunweijilu.objects.filter(id=id).update(wtms=wtms,memo=memo,wtly=wtly,clbf=clbf,wtjssj=wtjssj,clr=clr,kssj=kssj,jssj=jssj,type=type,machinaroom=machinaroom)
return HttpResponseRedirect("edit_yunweijilu.html?id="+id)
def del_yunweijilu(request):
id=request.GET.get('id')
iid=int(id)
Yunweijilu.objects.filter(id=iid).delete()
wtms=request.GET.get('wtms','').strip()
wtly=request.GET.get('wtly','').strip()
clr=request.GET.get('clr','').strip()
yb=str(int(time.strftime('%Y',time.localtime(time.time())))-3)
ya=str(int(time.strftime('%Y',time.localtime(time.time())))+3)
tb=yb+"-12-12 12:12"
ta=ya+"-12-12 12:12"
kssj=request.GET.get('kssj',tb)
jssj=request.GET.get('jssj',ta)
type=request.GET.get('type',"100")
machinaroom=request.GET.get("machinaroom","100")
page=request.GET.get('page','1')
return HttpResponseRedirect("search_yunweijilu.html"+"?"+"wtms="+wtms+"&&wtly="+wtly+"&&clr="+clr+"&&kssj="+kssj+"&&jssj="+jssj+"&&type="+type+"&&machinaroom="+machinaroom+"&&page="+page)
def batdel_yunweijilu(request):
ids=request.GET.get('ids')
b=ids.split(',')
arr = map(int,b)
for aaa in arr:
Yunweijilu.objects.filter(id=aaa).delete()
wtms=request.GET.get('wtms','').strip()
wtly=request.GET.get('wtly','').strip()
clr=request.GET.get('clr','').strip()
yb=str(int(time.strftime('%Y',time.localtime(time.time())))-3)
ya=str(int(time.strftime('%Y',time.localtime(time.time())))+3)
tb=yb+"-12-12 12:12"
ta=ya+"-12-12 12:12"
kssj=request.GET.get('kssj',tb)
jssj=request.GET.get('jssj',ta)
type=request.GET.get('type',"100")
machinaroom=request.GET.get("machinaroom","100")
return HttpResponseRedirect("search_yunweijilu.html"+"?"+"wtms="+wtms+"&&wtly="+wtly+"&&clr="+clr+"&&kssj="+kssj+"&&jssj="+jssj+"&&type="+type+"&&machinaroom="+machinaroom)
def excel(machinaroomid,wtms,wtly,clr,type,kssj,jssj):
if wtms=='' and wtly=='' and clr=='' and type==100:
q={}
q['kssj__gte']=kssj
q['jssj__lte']=jssj
q['machinaroom_id']=machinaroomid
list_obj = Yunweijilu.objects.filter(q).order_by("wtjssj")
q['type']=0
a= Yunweijilu.objects.filter(
q).count()
q['type']=1
b= Yunweijilu.objects.filter(q).count()
q['type']=2
c= Yunweijilu.objects.filter(
q).count()
q['type']=3
d= Yunweijilu.objects.filter(q).count()
q['type']=4
e= Yunweijilu.objects.filter(
q).count()
q['type']=5
f= Yunweijilu.objects.filter(q).count()
q['type']=6
g= Yunweijilu.objects.filter(
q).count()
q['type']=7
h= Yunweijilu.objects.filter(q).count()
q['type']=8
i= Yunweijilu.objects.filter(
q).count()
q['type']=9
j= Yunweijilu.objects.filter(q).count()
else:
q={}
if wtms!='':
q['wtms__icontains']=wtms
if wtly!='':
q['wtly__icontains']=wtly
if clr!='':
q['clr__icontains']=clr
if type!=100:
q['type']=type
q['machinaroom_id']=machinaroomid
q['kssj__gte']=kssj
q['jssj__lte']=jssj
list_obj = Yunweijilu.objects.filter(
q).order_by("wtjssj")
q['type']=0
a= Yunweijilu.objects.filter(q).count()
q['type']=1
b= Yunweijilu.objects.filter(
q).count()
q['type']=2
c= Yunweijilu.objects.filter(q).count()
q['type']=3
d= Yunweijilu.objects.filter(
q).count()
q['type']=4
e= Yunweijilu.objects.filter(q).count()
q['type']=5
f= Yunweijilu.objects.filter(
q).count()
q['type']=6
g= Yunweijilu.objects.filter(q).count()
q['type']=7
h= Yunweijilu.objects.filter(
q).count()
q['type']=8
i= Yunweijilu.objects.filter(q).count()
q['type']=9
j= Yunweijilu.objects.filter(
q).count()
if list_obj:
font0=Font()
font0.name="微软雅黑 Light"
font1=Font()
font1.name="微软雅黑 Light"
font1.bold=True

    pattern=Pattern()
    pattern.pattern = Pattern.SOLID_PATTERN
    pattern.pattern_fore_colour = 0x30

    ali=Alignment()
    ali.horz=Alignment.HORZ_LEFT
    ali.vert=Alignment.VERT_CENTER

    style1 = XFStyle()
    style1.num_format_str = 'YYYY-MM-D HH:mm'
    style1.font=font0
    style1.alignment=ali

    style2=XFStyle()
    style2.font=font1
    style2.pattern=pattern
    style2.alignment=ali

    style3=XFStyle()
    style3.font=font0
    style3.alignment=ali
    mr=Machinaroom.objects.get(id=machinaroomid)
    # 创建工作薄
    ws = Workbook(encoding='utf-8')
    w = ws.add_sheet(mr.name)
    w.write(0, 0, u"日常巡检",style2)
    w.write(0, 1, u"网络设备配置",style2)
    w.write(0, 2, u"安全设备配置",style2)
    w.write(0, 3, u"系统部署",style2)
    w.write(0, 4, u"安全运维",style2)
    w.write(0,5,u"系统更新/维护",style2)
    w.write(0,6,u"系统重启",style2)
    w.write(0,7,u"系统迁移",style2)
    w.write(0,8,u"系统扩容",style2)
    w.write(0,9,u"技术支持",style2)
    w.write(1, 0, a,style3)
    w.write(1, 1,b,style3)
    w.write(1, 2,c,style3)
    w.write(1, 3,d,style3)
    w.write(1, 4,e,style3)
    w.write(1,5,f,style3)
    w.write(1,6,g,style3)
    w.write(1,7,h,style3)
    w.write(1,8,i,style3)
    w.write(1,9,j,style3)

    w.write(3, 0, u"1",style2)
    w.write(3, 1,u"类型",style2)
    w.write(3, 2,u"问题描述",style2)
    w.write(3, 3,u"问题来源",style2)
    w.write(3, 4,u"问题接收时间",style2)
    w.write(3,5,u"处理人",style2)
    w.write(3,6,u"开始时间",style2)
    w.write(3,7,u"结束时间",style2)
    w.write(3,8,u"处理办法",style2)
    w.write(3,9,u"备注",style2)
    w.col(4).width=4333
    w.col(6).width=4333
    w.col(7).width=4333
    w.col(8).width=8888
    # 写入数据
    excel_row = 4
    he=0
    for obj in list_obj:
        he=he+1
        data_id = he
        if obj.type == 0:
            data_type='日常巡检'
        elif obj.type == 1:
            data_type='网络设备配置'
        elif obj.type == 2:
            data_tpye='安全设备配置'
        elif obj.type == 3:
            data_tpye='系统部署'
        elif obj.type == 4:
            data_type='安全运维'
        elif obj.type == 5:
            data_type='系统更新/维护'
        elif obj.type == 6:
            data_type='系统重启'
        elif obj.type == 7:
            data_type='系统迁移'
        elif obj.type == 8:
            data_type='系统扩容'
        elif obj.type == 9:
            data_type='技术支持'
        else:
            date_type='其他'
        data_wtms = obj.wtms
        data_wtly = obj.wtly
        data_wtjssj = obj.wtjssj
        data_clr = obj.clr
        data_kssj=obj.kssj
        data_jssj=obj.jssj
        data_clbf=obj.clbf
        data_memo=obj.memo
        w.write(excel_row, 0, he,style3)
        w.write(excel_row, 1, data_type,style3)
        w.write(excel_row, 2, data_wtms,style3)
        w.write(excel_row, 3, data_wtly,style3)
        w.write(excel_row, 4, data_wtjssj,style1)
        w.write(excel_row, 5, data_clr,style3)
        w.write(excel_row, 6, data_kssj,style1)
        w.write(excel_row, 7, data_jssj,style1)
        w.write(excel_row,8,data_clbf,style3)
        w.write(excel_row,9,data_memo,style3)
        excel_row += 1
    sio = StringIO.StringIO()
    year=datetime.datetime.now().year
    fn=str(year)+"系统支持部运维记录("+wtms+mr.name+wtly+clr+kssj+jssj+".xls"
    sio.seek(0)
    response = HttpResponse(sio.getvalue(), content_type='application/vnd.ms-excel')
    response['Content-Disposition'] = 'attachment; filename="%s"' % (urlquote(fn))
    response.write(sio.getvalue())
    ws.save(response)
    return response

def lis(machinaroomid,wtms,wtly,clr,type,kssj,jssj):
if wtms=='' and wtly=='' and clr=='' and type==100:
q={}
q['kssj__gte']=kssj
q['jssj__lte']=jssj
q['machinaroom_id']=machinaroomid
list_obj = Yunweijilu.objects.filter(q).order_by("wtjssj")
q['type']=0
a= Yunweijilu.objects.filter(
q).count()
q['type']=1
b= Yunweijilu.objects.filter(q).count()
q['type']=2
c= Yunweijilu.objects.filter(
q).count()
q['type']=3
d= Yunweijilu.objects.filter(q).count()
q['type']=4
e= Yunweijilu.objects.filter(
q).count()
q['type']=5
f= Yunweijilu.objects.filter(q).count()
q['type']=6
g= Yunweijilu.objects.filter(
q).count()
q['type']=7
h= Yunweijilu.objects.filter(q).count()
q['type']=8
i= Yunweijilu.objects.filter(
q).count()
q['type']=9
j= Yunweijilu.objects.filter(q).count()
hh={}
hh['list_obj']=list_obj
hh['a']=a
hh['b']=b
hh['c']=c
hh['d']=d
hh['e']=e
hh['f']=f
hh['g']=g
hh['h']=h
hh['i']=i
hh['j']=j
for ll in hh['list_obj']:
print ll.wtms
return hh
else:
q={}
if wtms!='':
q['wtms__icontains']=wtms
if wtly!='':
q['wtly__icontains']=wtly
if clr!='':
q['clr__icontains']=clr
if type!=100:
q['type']=type
q['machinaroom_id']=machinaroomid
q['kssj__gte']=kssj
q['jssj__lte']=jssj
list_obj = Yunweijilu.objects.filter(
q).order_by("wtjssj")
q['type']=0
a= Yunweijilu.objects.filter(q).count()
q['type']=1
b= Yunweijilu.objects.filter(
q).count()
q['type']=2
c= Yunweijilu.objects.filter(q).count()
q['type']=3
d= Yunweijilu.objects.filter(
q).count()
q['type']=4
e= Yunweijilu.objects.filter(q).count()
q['type']=5
f= Yunweijilu.objects.filter(
q).count()
q['type']=6
g= Yunweijilu.objects.filter(q).count()
q['type']=7
h= Yunweijilu.objects.filter(
q).count()
q['type']=8
i= Yunweijilu.objects.filter(q).count()
q['type']=9
j= Yunweijilu.objects.filter(
q).count()
hh={}
hh['list_obj']=list_obj
hh['a']=a
hh['b']=b
hh['c']=c
hh['d']=d
hh['e']=e
hh['f']=f
hh['g']=g
hh['h']=h
hh['i']=i
hh['j']=j
for ll in hh['list_obj']:
print ll.wtms
return hh
def excel_yunweijilu(request):
machinaroom=int(request.GET.get("machinaroom","100"))
wtms=request.GET.get('wtms','').strip()
wtly=request.GET.get('wtly','').strip()
clr=request.GET.get('clr','').strip()
yb=str(int(time.strftime('%Y',time.localtime(time.time())))-3)
ya=str(int(time.strftime('%Y',time.localtime(time.time())))+3)
tb=yb+"-12-12 12:12"
ta=ya+"-12-12 12:12"
kssj=request.GET.get('kssj',tb)
jssj=request.GET.get('jssj',ta)
type=int(request.GET.get('type',"100"))
if machinaroom!=100:
return excel(machinaroom,wtms,wtly,clr,type,kssj,jssj)
else:
font0=Font()
font0.name="微软雅黑 Light"

       font1=Font()
       font1.name="微软雅黑 Light"
       font1.bold=True
       
       pattern=Pattern()
       pattern.pattern = Pattern.SOLID_PATTERN
       pattern.pattern_fore_colour = 0x30
       
       ali=Alignment()
       ali.horz=Alignment.HORZ_LEFT
       ali.vert=Alignment.VERT_CENTER
         
       style1 = XFStyle()
       style1.num_format_str = 'YYYY-MM-D HH:mm'
       style1.font=font0
       style1.alignment=ali

       style2=XFStyle()
       style2.font=font1
       style2.pattern=pattern
       style2.alignment=ali

       style3=XFStyle()
       style3.font=font0
       style3.alignment=ali

       ws = Workbook(encoding='utf-8')
       mrl=Machinaroom.objects.all()
       for mr in mrl:
            h1=lis(mr.id,wtms,wtly,clr,type,kssj,jssj)
            w = ws.add_sheet(mr.name)
            w.write(0, 0, u"日常巡检",style2)
            w.write(0, 1, u"网络设备配置",style2)
            w.write(0, 2, u"安全设备配置",style2)
            w.write(0, 3, u"系统部署",style2)
            w.write(0, 4, u"安全运维",style2)
            w.write(0,5,u"系统更新/维护",style2)
            w.write(0,6,u"系统重启",style2)
            w.write(0,7,u"系统迁移",style2)
            w.write(0,8,u"系统扩容",style2)
            w.write(0,9,u"技术支持",style2)
            w.write(1, 0, h1['a'],style3)
            w.write(1, 1,h1['b'],style3)
            w.write(1, 2,h1['c'],style3)
            w.write(1, 3,h1['d'],style3)
            w.write(1, 4,h1['e'],style3)
            w.write(1,5,h1['f'],style3)
            w.write(1,6,h1['g'],style3)
            w.write(1,7,h1['h'],style3)
            w.write(1,8,h1['i'],style3)
            w.write(1,9,h1['j'],style3)

            w.write(3, 0, u"1",style2)
            w.write(3, 1,u"类型",style2)
            w.write(3, 2,u"问题描述",style2)
            w.write(3, 3,u"问题来源",style2)
            w.write(3, 4,u"问题接收时间",style2)
            w.write(3,5,u"处理人",style2)
            w.write(3,6,u"开始时间",style2)
            w.write(3,7,u"结束时间",style2)
            w.write(3,8,u"处理办法",style2)
            w.write(3,9,u"备注",style2)
            excel_row = 4
            he=0
            w.col(4).width=4333
            w.col(6).width=4333
            w.col(7).width=4333
            w.col(8).width=8888
            #w.columns.Autofit()
            for obj in h1['list_obj']:
                    he=he+1
                    data_id = he
                    if obj.type == 0:
                            data_type='日常巡检'
                    elif obj.type == 1:
                            data_type='网络设备配置'
                    elif obj.type == 2:
                            data_tpye='安全设备配置'
                    elif obj.type == 3:
                            data_tpye='系统部署'
                    elif obj.type == 4:
                            data_type='安全运维'
                    elif obj.type == 5:
                            data_type='系统更新/维护'
                    elif obj.type == 6:
                            data_type='系统重启'
                    elif obj.type == 7:
                            data_type='系统迁移'
                    elif obj.type == 8:
                            data_type='系统扩容'
                    elif obj.type == 9:
                            data_type='技术支持'
                    else:
                            date_type='其他'
                    data_wtms = obj.wtms
                    data_wtly = obj.wtly
                    data_wtjssj = obj.wtjssj
                    data_clr = obj.clr
                    data_kssj=obj.kssj
                    data_jssj=obj.jssj
                    data_clbf=obj.clbf
                    data_memo=obj.memo
                    w.write(excel_row, 0, he,style3)
                    w.write(excel_row, 1, data_type,style3)
                    w.write(excel_row, 2, data_wtms,style3)
                    w.write(excel_row, 3, data_wtly,style3)
                    w.write(excel_row, 4, data_wtjssj,style1)
                    w.write(excel_row, 5, data_clr,style3)
                    w.write(excel_row, 6, data_kssj,style1)
                    w.write(excel_row, 7, data_jssj,style1)
                    w.write(excel_row,8,data_clbf,style3)
                    w.write(excel_row,9,data_memo,style3)
                    excel_row += 1
       sio = StringIO.StringIO()
       year=datetime.datetime.now().year
       fn=str(year)+"系统支持部运维记录.xls"
       #ws.save(sio)
       sio.seek(0)
       response = HttpResponse(sio.getvalue(), content_type='application/vnd.ms-excel;charset=utf-8')
       response['Content-Disposition'] = 'attachment; filename="%s"' % (urlquote(fn))
       response.write(sio.getvalue())
       ws.save(response)
       return response

urls.py

from django.conf.urls import url
from django.contrib import admin
from cmdbapp import machinaroomviews,serverviews,networkdeviceviews,securitydeviceviews,softwareviews,storagedeviceviews,manufactoryviews,yunweijiluviews
from django.contrib.auth.views import *
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import staticfiles
from django.views.static import serve

urlpatterns = [
url(r'^static/(?P<path>.*)',serve,{'document_root': settings.STATIC_ROOT}), url(r'^',machinaroomviews.main_page,name='main_page'),
url(r'^base',machinaroomviews.base,name='base'),
url(r'^search_machinaroom.html',machinaroomviews.search_machinaroom,name='search_machinaroom'), url(r'^add_machinaroom.html',machinaroomviews.add_machinaroom,name='add_machinaroom'),
url(r'^edit_machinaroom.html',machinaroomviews.edit_machinaroom,name='edit_machinaroom'),
url(r'^del_machinaroom.html',machinaroomviews.del_machinaroom,name='del_machinaroom'),
url(r'^batdel_machinaroom.html',machinaroomviews.batdel_machinaroom,name='batdel_machinaroom'),
url(r'^excel_machinaroom.html',machinaroomviews.excel_machinaroom,name='excel_machinaroom'),
url(r'^login/', login), url(r'^search_server.html',serverviews.search_server,name='search_server'),
url(r'^add_server.html',serverviews.add_server,name="add_server"), url(r'^edit_server.html',serverviews.edit_server,name="edit_server"),
url(r'^del_server.html',serverviews.del_server,name='del_server'),
url(r'^batdel_server.html',serverviews.batdel_server,name='batdel_server'),
url(r'^excel_server.html',serverviews.excel_server,name='excel_server'),
url(r'^search_networkdevice.html',networkdeviceviews.search_networkdevice,name='search_networkdevice'), url(r'^add_networkdevice.html',networkdeviceviews.add_networkdevice,name="add_networkdevice"),
url(r'^edit_networkdevice.html',networkdeviceviews.edit_networkdevice,name="edit_networkdevice"), url(r'^del_networkdevice.html',networkdeviceviews.del_networkdevice,name='del_networkdevice'), url(r'^batdel_networkdevice.html',networkdeviceviews.batdel_networkdevice,name='batdel_networkdevice'), url(r'^excel_networkdevice.html',networkdeviceviews.excel_networkdevice,name='excel_networkdevice'), url(r'^search_securitydevice.html',securitydeviceviews.search_securitydevice,name='search_securitydevice'),
url(r'^add_securitydevice.html',securitydeviceviews.add_securitydevice,name="add_securitydevice"), url(r'^edit_securitydevice.html',securitydeviceviews.edit_securitydevice,name="edit_securitydevice"),
url(r'^del_securitydevice.html',securitydeviceviews.del_securitydevice,name='del_securitydevice'),
url(r'^batdel_securitydevice.html',securitydeviceviews.batdel_securitydevice,name='batdel_securitydevice'),
url(r'^excel_securitydevice.html',securitydeviceviews.excel_securitydevice,name='excel_securitydevice'),
url(r'^search_storagedevice.html',storagedeviceviews.search_storagedevice,name='search_storagedevice'), url(r'^add_storagedevice.html',storagedeviceviews.add_storagedevice,name="add_storagedevice"),
url(r'^edit_storagedevice.html',storagedeviceviews.edit_storagedevice,name="edit_storagedevice"), url(r'^del_storagedevice.html',storagedeviceviews.del_storagedevice,name='del_storagedevice'), url(r'^batdel_storagedevice.html',storagedeviceviews.batdel_storagedevice,name='batdel_storagedevice'), url(r'^excel_storagedevice.html',storagedeviceviews.excel_storagedevice,name='excel_storagedevice'), url(r'^search_software.html',softwareviews.search_software,name='search_software'),
url(r'^add_software.html',softwareviews.add_software,name='add_software'), url(r'^edit_software.html',softwareviews.edit_software,name='edit_software'), url(r'^del_software.html',softwareviews.del_software,name='del_software'), url(r'^batdel_software.html',softwareviews.batdel_software,name='batdel_software'), url(r'^excel_software.html',softwareviews.excel_software,name='excel_software'), url(r'^search_manufactory.html',manufactoryviews.search_manufactory,name='search_manufactory'),
url(r'^add_manufactory.html',manufactoryviews.add_manufactory,name='add_manufactory'), url(r'^edit_manufactory.html',manufactoryviews.edit_manufactory,name='edit_manufactory'), url(r'^del_manufactory.html',manufactoryviews.del_manufactory,name='del_manufactory'), url(r'^batdel_manufactory.html',manufactoryviews.batdel_manufactory,name='batdel_manufactory'), url(r'^excel_manufactory.html',manufactoryviews.excel_manufactory,name='excel_manufactory'), url(r'^search_yunweijilu.html',yunweijiluviews.search_yunweijilu,name='search_yunweijilu'),
url(r'^add_yunweijilu.html',yunweijiluviews.add_yunweijilu,name="add_yunweijilu"), url(r'^edit_yunweijilu.html',yunweijiluviews.edit_yunweijilu,name="edit_yunweijilu"),
url(r'^del_yunweijilu.html',yunweijiluviews.del_yunweijilu,name='del_yunweijilu'),
url(r'^batdel_yunweijilu.html',yunweijiluviews.batdel_yunweijilu,name='batdel_yunweijilu'),
url(r'^excel_yunweijilu.html',yunweijiluviews.excel_yunweijilu,name='excel_yunweijilu'),
]

下载datepicker控件到static/sytle/下

wget https://www.html5tricks.com/download/css3-cool-in-out-tab-menu.rar
wget https://github.com/trentrichardson/jQuery-Timepicker-Addon/archive/master.zip
wget https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip
wget https://github.com/mleibman/SlickGrid/archive/master.zip

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,793评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 87,567评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,342评论 0 338
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,825评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,814评论 5 368
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,680评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,033评论 3 399
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,687评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 42,175评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,668评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,775评论 1 332
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,419评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,020评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,978评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,206评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,092评论 2 351
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,510评论 2 343

推荐阅读更多精彩内容

  • 客在红尘漂,不求姓名留;人在天涯旅,难忘是相思。 ——题记 昨晚的月光,是那么的寒,半边的弧度,勾露出缺病的单调,...
    蒲攀阅读 490评论 0 8
  • 我是如何在1992年通过英语六级的 文/波罗的海V 高中家长群又在叨叨高考那些事,有家长提起学英语这件事,总之说了...
    波罗的海v阅读 640评论 8 5
  • 见到你的时候 就想到了死亡 记忆里已百年了 离死亡还需几万年 那方静静的坟 埋葬我到地球毁灭
    中习习阅读 143评论 6 2
  • 空森林阅读 203评论 0 1