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
url(r'^base',machinaroomviews.base,name='base'),
url(r'^search_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/',serverviews.search_server,name='search_server'),
url(r'^add_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.add_networkdevice,name="add_networkdevice"),
url(r'^edit_networkdevice.html',securitydeviceviews.search_securitydevice,name='search_securitydevice'),
url(r'^add_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.add_storagedevice,name="add_storagedevice"),
url(r'^edit_storagedevice.html',softwareviews.search_software,name='search_software'),
url(r'^add_software.html',manufactoryviews.search_manufactory,name='search_manufactory'),
url(r'^add_manufactory.html',yunweijiluviews.search_yunweijilu,name='search_yunweijilu'),
url(r'^add_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